views:

794

answers:

2

I'm telling the view to display a field with the NID contents. I'm telling it that I wish to "Rewrite the output of this field" and I enter:

<a href=”javascript:void(0);”  onclick="javascript: approve([nid])" >Approve</a>

When viewing the page, all the javascript has been stripped. How do I get views to accept javascript in the link, or what other way can I use to display a link?

Note: Custom Text field doesn't work either.

A: 

Found the solution! http://drupal.org/project/views%5Fcustomfield

From the description:

This module provides some useful (views)fields. Available (views)fields: Markup Field that allows usage of custom text and the input filter system. PHP code Field that allows usage of custom PHP code (with access to view's database result) Rownumber Field containing rownumber (respects pagers).

RD
A: 

and then you did what?

headkit