Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to pass parameter from jsp to javascript

843840Mar 7 2009 — edited Mar 9 2009
Hi,

I have retrieved ResultSet from my servlet( by request.getAttribute) and displayed results in jsp. Now in jsp page, i'm trying to add a column(as link) for every record and upon clicking on that , it goes to javascript but i'm unable to capture that value in javascript which i have appended in every row of jsp resultset like
.
.
.
out.println("<a href=\"javascript:accept('<%=rs.getString(1) %>')\">Accept</a>");

Note: i want to pass rs.getString(1) value when any link was selected on corresponding row. Please tell me what was going wrong with this.

Regards,
Sukumar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 6 2009
Added on Mar 7 2009
4 comments
1,451 views