Data from Java Script to Servlet
1 posts in topic
Flat View  Flat View

Posted By:   Ravi_kiran
Posted On:   Friday, April 6, 2001 10:56 PM

I have stored few values in Java Script,
How to send these values from Java Script to a Servlet which will accept these values and store them in database?

Re: Data from Java Script to Servlet

Posted By:   Nirmal_Lahiri  
Posted On:   Sunday, April 15, 2001 11:20 PM

In the javascript function call:
location.href="http://yoururl/servlet/yourservlet?PARAMETER1="+javascriptvar1+"&PARAMETER2"+javascriptvar2...so on

In the servlet,call :

String var1=request.getParameter("PARAMETER1");

and so on
About | Sitemap | Contact