Re: Help -- Fill Form on Another Page
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Help -- Fill Form on Another Page

From: alu <none@none.com>
Date: Sat Jul 23 2005 - 01:38:40 CEST

"Terry" <Someone@N0where.c0m> wrote
> Hi,
>
> I am trying to figure how to do the following:
>
> I have 2 pages, Page 1 has a simple form with a field called "Number",
> and Page 2 has a button. Whenever the button on Page 2 is clicked, the
> browser will be redirected to Page 1 and have the field "Number" filled
> automatically with a number which is unique to Page 2.
>
> I am new to Javascript and don't know if this is possible. And if it
> is, how to go about doing it.
>
> Many thanks in advance for your help!
>
> Terry

Basically your answer is to pass the variable in the URL query string.
(e.g. onclick='document.location="Page1.html?NumberValueToBePassed"';)
I don't have time to elaborate tonight, maybe someone else will,
but in the meantime you can research passing variables via a query string.
-alu
Received on Tue Oct 18 03:00:08 2005