473,387 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Request.Form equivalent in client side javascript?

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.
Jul 23 '05 #1
2 6189


Sergio Otoya wrote:
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

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #2
In article <33*************************@posting.google.com> ,
se****@winapp.com.au enlightened us with...

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/kaelisSpa..._parseUrl.html

--
--
~kaeli~
Suicide is the most sincere form of self-criticism.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: cruiserweight | last post by:
I've constructed this form so that if Javascript is disaabled it will show a typical <input type="submit"> button, BUT using the <noscript> tag. Why is this a problem and what's a viable solution?...
3
by: news.rcn.com | last post by:
How can I access the request and response object for a page using javascript. I want to stick some data on with something like request.setAttribute( "User's choice for later use" ). I can't seem...
8
by: Angel | last post by:
I am trying to access in Javascript within an ASP.NET web page the Request Object. I am specifically trying to access the values in the Request.QueryString. When I try to access the values I get an...
10
by: Mr Newbie | last post by:
DropDown lists and Listboxes do not appear in the list of controls and values passed back to the server on PostBack in Request.Form object. Can someone confirm this to be correct and possibly...
4
by: dschruth | last post by:
Hello. Can anybody solve this problem? I am using a server-side language (PERL) to *try* to POST data to a HTTPS login script that doesn't have a standard "submit" button. The form appears...
27
by: Scott | last post by:
I've been trying to come up with a way to ensure user input is coming from the form on my site, and not auto-submitted from elsewhere, and I don't want to use the "enter the code shown in the...
18
by: Csaba Gabor | last post by:
Is there a straightforward way of implementing a PHP equivalent to window.setTimeout? In a javascript web app, it's often the case that things are done on an event driven basis. For example,...
6
by: magix | last post by:
Hi, Can I: <script language="javascript"> var TimeSec = new String (Request.form("TimeInSec")); or
2
by: Doogie | last post by:
Hi, I'm writing Javascript code to parse out a query string. I want to handle the case where a parameter value may not be sent. So consider a parameter called "State". If the user doesn't pass...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.