Can you set and or get a parameter from the request using JavaScript?

Is there a way in JavaScript to as you would in Java to set or get a parameter from the request?
For example:

request.getParameter("myParameterVal");
request.setParameter(myParameter, "value1");
jwright9Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
MorcalavinConnect With a Mentor Commented:
You can get the querystring from the current url by using the window.location.href property.  You can then parse that the get the values from the querystring.

As far as setting get values or getting/setting post values, no you can't do that.  Javascript(in the browser) is a client side language.  If you need to get parameters sent to the server side script, you need to access them using the server side scripting language you are using.
0
 
cyberstalkerCommented:
What kind of parameter do you want to get/set? It is possible to read/set GET variables by using window.location.search.
0
 
jwright9Author Commented:
I was looking for a way in JavaScript to get access to the HTTPRequest that one has in J2EE JSPs and Servlets.  I was hoping to get and set Parameter values in the HTTPRequest object.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.