dcsimg
<strong><font color="blue">Can I access Javascript variable in my JSP Function?</font></strong>
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ashwani_Yadav
Posted On:   Saturday, July 27, 2002 10:56 AM

I am facing problem in accessing javascript variable in JSP function.And this variable I am getting from the text box which is to be entered by the user dynamically.


I tried the same also by submitting the form then also I am not able to solve it.



Actually Using this I want to pass this javascript variable to my query string to access the database.



If anybody has some solution/clue please tell me.

Re: <strong>Can I access Javascript variable in my JSP Function?</strong>

Posted By:   Animesh_Srivastava  
Posted On:   Sunday, July 28, 2002 11:42 PM

Set the javascript variable in a hidden input field inside the form and post it to your server. The receiving jsp will have access to the value of the input box. You have said you tried using the form submitting but it didnt work. Well, I guess you would have tried something similar to what I have just explained, if that is case then it should have ideally worked. If there is something specific that didnt work in the form submission method then pls let us know (like setting the value of input box equal to the javascript variable, or retreiving the value when the form is submitted.)


Hope that helps.

Animesh.
About | Sitemap | Contact