aspose file tools*
The moose likes JSP and the fly likes how can assign hidden variable value to JSTL variable,with out submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how can assign hidden variable value to JSTL variable,with out submit" Watch "how can assign hidden variable value to JSTL variable,with out submit" New topic
Author

how can assign hidden variable value to JSTL variable,with out submit

test check
Greenhorn

Joined: Oct 20, 2010
Posts: 2
Is it possible to assign JSP hidden variable value to JSTL var

the code is something like this




<input type="hidden" id ="setDay" name ="setDay" value ="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31" />

(in javascript function i am modifying value of setDay based month value which will be available from database.. after that i want to assign this value to coDate)

<c:set var ="coDate" value ="${setDay}" />

How that can be done?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60045
    
  65

It can't. The JSP executes on the server long before the HTML page gets sent to the client for JavaScript to execute there. SO not only do the JSP and the JavaScript run at different times, they do not even run on the same machine. There can be no direct interaction.

Please read this article to understand how JSP operates.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

By JSP you can't, but you can use javascript again.

take a look here. I've just talked about that... http://www.coderanch.com/t/514547/JSP/java/Process-Custom-tag-based-given#2328212


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
test check
Greenhorn

Joined: Oct 20, 2010
Posts: 2
Thank you friends for your inputs.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can assign hidden variable value to JSTL variable,with out submit
 
Similar Threads
assign var to java variable
how can v pass javascript values to jsp
Passing the JSTL variable (with special characters) to JavaScript function?
get string values from Request and Session
questions about JSTL variables