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
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
JSP
send variable
Bacchi Gerem
Ranch Hand
Posts: 120
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
How can i send variable from javascript to
jsp
.
Thanks
Bear Bibeault
Sheriff
Posts: 67753
173
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
That greatly depends upon what you mean by "send". Please
read this
.
Do you mean as part of a form submission?
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Bacchi Gerem
Ranch Hand
Posts: 120
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How can i send variable a to jsp page :
code :
function callEdit(key)
{
var a = document.user.tempId.value=key;
alert(a);
document.user.action="http://localhost:8084/Struts_Contract_Entry/jsp/mysql.jsp?edit=a"
document.user.submit();
}
Thanks
Bear Bibeault
Sheriff
Posts: 67753
173
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Ah, you want to send it as a request parameter on the query
string
. This is the sort of detail that should have been provided in the first post.
document.user.action="http://localhost:8084/Struts_Contract_Entry/jsp/mysql.jsp?edit=" + encodeURIComponent(a);
This will append the value of a to the URL after properly encoding it.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Bacchi Gerem
Ranch Hand
Posts: 120
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thank You. I got it.
Right! We're on it! Let's get to work tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
jsp
design issue
hidden variable?
RequestDispatcher now working as expected
How to copy a portion of xsl into a variable
More...