Connecting Tech Pros Worldwide Help | Site Map

Help -- Fill Form on Another Page

  #1  
Old July 23rd, 2005, 10:34 PM
Terry
Guest
 
Posts: n/a
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
  #2  
Old July 23rd, 2005, 10:34 PM
alu
Guest
 
Posts: n/a

re: Help -- Fill Form on Another Page



"Terry" <Someone@N0where.c0m> wrote[color=blue]
> 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[/color]

Basically your answer is to pass the variable in the URL query string.
(e.g. onclick='document.location="Page1.html?NumberValue ToBePassed"';)
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


  #3  
Old July 25th, 2005, 03:45 AM
Danny
Guest
 
Posts: n/a

re: Help -- Fill Form on Another Page




Well:

on page2 ---------------------------

<input type="button" onclick="location+='?UNIQUENUMBERHERE'" valu="click">


on page1 ----------------------------
<body onload="document.duck.here.value=location.search.s lice(1)">



<form name="duck">
<input name="here">
</form>


Danny[color=blue]
>
> Terry[/color]



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Closed Thread