Request.Form equivalent in client side javascript?

S

Sergio Otoya

Hi all,

I have a potentially simple question...

I need to keep the value of a field between form posts?
I was thinking of using the equivalent of Request.Form("Field1") in
javascript to set the value of the field on the body onload event? is
this possible in javascript?
Is there are simple way to do this?

Any help would be appreciated.

Thanks in advance.

Sergio.
 
M

Martin Honnen

Sergio said:
I need to keep the value of a field between form posts?
I was thinking of using the equivalent of Request.Form("Field1") in
javascript to set the value of the field on the body onload event? is
this possible in javascript?

You cannot post to a static HTML page so there should be some
server-side page processing your post data which could then create the
script for the client with the right objects.
Client-side JavaScript on the receiving page itself has no access to
post data.
With the GET method you can read out and parse
location.search
 
K

kaeli

I need to keep the value of a field between form posts?
I was thinking of using the equivalent of Request.Form("Field1") in
javascript to set the value of the field on the body onload event? is
this possible in javascript?

There is no equivalent to Request.Form in client-side javascript.
Is there are simple way to do this?

Sure. Use the URL. Use GET to pass the form, then parse the URL to get
the value(s) as needed.

http://www.ipwebdesign.net/kaelisSpace/useful_parseUrl.html

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top