| Author |
How to assign js variable to jsp variable
|
shyam sunder prasad
Ranch Hand
Joined: Mar 23, 2011
Posts: 62
|
|
how to assign java script variable to jsp scriplet variable.
like jspName=name;
please help,thanks in advance.
|
 |
Shanky Sohar
Ranch Hand
Joined: Mar 17, 2010
Posts: 1046
|
|
This can be done effectively with the help of form submission..
Submit the form and then request goes to servlet and in servet set the request parameter,or session parameter as per your requirement
Get those parameter in your jsp scriplet
|
SCJP6.0,My blog Ranchers from Delhi
|
 |
shyam sunder prasad
Ranch Hand
Joined: Mar 23, 2011
Posts: 62
|
|
no i want fetch the data there it self
|
 |
Shanky Sohar
Ranch Hand
Joined: Mar 17, 2010
Posts: 1046
|
|
|
Its not possible.as the scope of javascript is within the page only where you are using it
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56168
|
|
|
You have a fundamental misunderstanding of what JSP is and how it works. Please read this article to see why what you are asking is completely impossible.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: How to assign js variable to jsp variable
|
|
|