View Single Post
Old 03-17-2006, 01:35 AM   #4 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,166
Belisarius is on a distinguished road
Ah, it's not a JSP problem then, but an HTML and Javascript problem.

You're looking for
Code:
<a href="javascript:void(0)" onClick="testLink('<%= a_name %>')"><%= h_Nm %></a>
"javascript:void(0)" will allow you to execute Javascript using the anchor tag by basically telling the browser to not follow the hyperlink like it usually would. You can then use the "onClick" or other attribute.

Because you're handing the value directly to the function, you'll need to quote it, but you don't want to break out of the quote used by the "onClick", so you need to use the single quote.

Re-arraign to taste.
__________________
GitS
Belisarius is offline   Reply With Quote