Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing another form's elements thru javascript

Status
Not open for further replies.

shalni

Programmer
Oct 16, 2003
12
0
0
IN
Hi,

Consider two pages, first.html and second.html. From first.html, i am submitting a form to second.html. I must access form elements of first.html in second.html through javascript. How to do this? Please help
 
You should just access them via normal html method to get the post variables. HTTP_POST_VARS - I think.
Then put those into the new form.
 
Sorry, ignore my last statement. Wrong forum, sorry. :-(
 
If the second page is being generated by some server side code and the first page is POSTed to it, then you can have the code add the first page's fields as HIDDEN fields on the form.

If you are passing from one HTML page to another, suggest that you try using the GET method to pass the data - i.e. via the browsers Query String.

Alternatively, you could look at Cookies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top