The moose likes HTML, CSS and JavaScript and the fly likes put jsp code in onclick event Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "put jsp code in onclick event" Watch "put jsp code in onclick event" New topic
Author

put jsp code in onclick event

michael yue
Ranch Hand

Joined: Nov 20, 2003
Posts: 204
Dear all;

Is it possible to put jsp code inside an onclick event
Example

<A HREF="http://www.link.com"
onKlick="<% ses.invalidate(); %>";>HTML link</A>

Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
You can put jsp anywhere on the page, but it will fire when the page loads.

JavaScript can not talk to JSP through its events, only form submissions...

Eric
 
 
subject: put jsp code in onclick event
 
Threads others viewed
Buttons and form submission
need help while using <nested:write>
Multiple form submission on single click on button
How to make an Image click just like a Submit button
Rendering a view with selectOneRadio
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com