Code Comments
Programming Forum and web based access to our favorite programming groups.hi my lordz,
Im learning JSP/JSTL and i want to do something like that :
<c:set var="name1" value="value1" scope="page" />
<c:out value='${pageScope.name1}' />
<form name="formulaire"
action="http://localhost:8080/ThirdApplication/index.jsp" method="get">
<input type="submit" value="Add" onclick=" <c:set var="name1"
value="value1Changed" scope="page" /> ">
</form>
<c:set var="name1" value="value1" scope="page" />
<c:out value='${pageScope.name1}' />
I want to know if it is possible to emmebed a JSTL command into an "onclick"
event to change the value of a variable ?
Thanks by advance and best regards.
Post Follow-up to this messageJulien M=E9rivaux wrote: > > I want to know if it is possible to emmebed a JSTL > command into an "onclick" event to change the value > of a variable ? > So if I understand what you are asking, when you click the button, you want an Expression Language variable to change? The short answer is, no. See, think of the JSTL tags as being server side variables and events, while the onClick event is client side. If you view the source of your page, you'll find that all the <c: /> ELs have been converted into their corresponding text/html, Without going into too much detail, you would use JavaScript to manipulate the client side variables and to drive the html events such as onClick. -- brian
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.