Connecting Tech Pros Worldwide Forums | Help | Site Map

Help -- Fill Form on Another Page

Terry
Guest
 
Posts: n/a
#1: Jul 23 '05
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

alu
Guest
 
Posts: n/a
#2: Jul 23 '05

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


Danny
Guest
 
Posts: n/a
#3: Jul 25 '05

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