I have a View of taxonomies. I want to rewrite the output of each field (name) as this:
<a href="javascript: void(0);" onClick="alert('[name]');">[name]</a>
so when I click on the taxonomy, it will prompt an alert with the term name.
I try to rewrite through the Views GUI to no avail.
I even tried with views_pre_render
but because there is no #markup property, the rewriting is not HTML but plain text.
I did the trick with views_pre_render and other kind of content, but not in taxonomy. And is it really impossible to achieve that in the GUI ? Surely I am missing something very very basic here.
onClick
. If you want to bind click event, you need to do it with JS behaviors.