Connecting Tech Pros Worldwide Help | Site Map

Help -- Fill Form on Another Page

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 09:34 PM
Terry
Guest
 
Posts: n/a
Default Help -- Fill Form on Another Page

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, 09:34 PM
alu
Guest
 
Posts: n/a
Default 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, 02:45 AM
Danny
Guest
 
Posts: n/a
Default 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/
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.