Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

JSTL
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.



Report this thread to moderator Post Follow-up to this message
Old Post
Julien Mérivaux
04-25-05 01:59 PM


Re: JSTL
Julien 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


Report this thread to moderator Post Follow-up to this message
Old Post
Brian Munroe
04-27-05 01:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Help archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:22 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.