Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSP
How to assign js variable to jsp variable
shyam sunder prasad
Ranch Hand
Posts: 62
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
<% String jspName=null; %> <script type="text/javascript"> var name="shyam"; </script>
how to assign
java
script variable to
jsp
scriplet variable.
like jspName=name;
please help,thanks in advance.
Shanky Sohar
Ranch Hand
Posts: 1051
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 62
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
no i want fetch the data there it self
Shanky Sohar
Ranch Hand
Posts: 1051
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Its not possible.as the scope of javascript is within the page only where you are using it
SCJP6.0,
My blog
Ranchers from Delhi
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Head First Servlets & JSP book - JSP Question
JS ---> JSP variables
how to call Jsp in servlet
server side and client side variables
use javascript variable in JSP?
More...