Forums Register Login

send variable

+Pie Number of slices to send: Send
Hi,
How can i send variable from javascript to jsp.


Thanks
+Pie Number of slices to send: Send
That greatly depends upon what you mean by "send". Please read this.

Do you mean as part of a form submission?
+Pie Number of slices to send: 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
+Pie Number of slices to send: 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.



This will append the value of a to the URL after properly encoding it.
+Pie Number of slices to send: Send
Thank You. I got it.
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1071 times.
Similar Threads
jsp
design issue
hidden variable?
RequestDispatcher now working as expected
How to copy a portion of xsl into a variable
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 00:46:43.