Re: Javascript to include field on next form
- From: Cov <dcoventry@xxxxxxxxxxx>
- Date: Sun, 30 Sep 2007 13:20:45 -0700
On Sep 29, 11:23 pm, Thomas 'PointedEars' Lahn <PointedE...@xxxxxx>
wrote:
irkl...@xxxxxxxxx wrote:
I've got a short form--1 field and a submit button. I want someone to
enter their name in that field, hit submit, and have their name be in
the "name" field on the next page (which contains a form). Am I even
in the right forum?
For you to be in the right or wrong (Web) forum would require this _public
Usenet newsgroup_ to be a (Web) forum instead. (You are using but a Google
mirror/archive of it.)
However, whether or not your question is off-topic here depends on how you
want to generate the "next page": using client-side J(ava)Script/ECMAScript
for this would be unwise, as that would not degrade gracefully; using
server-side J(ava)Script would be possible.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300d...@xxxxxxxxxxxxxxxx>
I think you have 3 options.
The first would be to use the URL to include the name you want put in
the form:
www.myurl.com/mysecondpage.html?John%20Smith
On the second page you could access the URL via document.referrer
Another option would be to use frames and access variables from the
parent frame with: parent.inputName
And Lastly, you could open the second form with a window with
window.open(). Again the parent variables are accessed through
parent.whatever-the-variable-name.
These are off the top of my head from when I used to code in
Javascript years ago. The information might be outdated and/or
inaccurate. Sorry.
.
- Follow-Ups:
- Re: Javascript to include field on next form
- From: David Mark
- Re: Javascript to include field on next form
- References:
- Javascript to include field on next form
- From: irkland
- Re: Javascript to include field on next form
- From: Thomas 'PointedEars' Lahn
- Javascript to include field on next form
- Prev by Date: Re: I need to write to a file.
- Next by Date: Re: Javascript to include field on next form
- Previous by thread: Re: Javascript to include field on next form
- Next by thread: Re: Javascript to include field on next form
- Index(es):