473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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
Jul 23 '05 #1
2 2024
alu

"Terry" <So*****@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?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
Jul 23 '05 #2


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

Terry


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 25 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Barry Margolin | last post by:
Can I do the following with Javascript? My state has a web site that can be used for online filing for unemployment benefits. Every week I have to go to the site and fill in a form, checking...
1
by: Esteban Felipe | last post by:
Hi, thanks for reading. I hope to find some help here before I commit suicide because this is driving me crazy. Please excuse me if this looks like a long post, but I hope that a complete...
2
by: student | last post by:
Hi all, I'm having trouble with my datagrid, it is suppose to display a row from a table called "Calls" based on what is selected in the dropdownlist which displays the first and last name from...
7
by: Aaron | last post by:
Complete code follows. I am new to .NET programming (and programming in general) and I am having a difficult time understanding how to fill a variable in one sub, and then access it from...
7
by: Richard | last post by:
I have a form with seven tapages. These span only one record with a large number of fields (textboxes). On Tabpage1 I display a number of read-only text boxes. This displays information about...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
2
by: nte | last post by:
Hi. I have a site where users can open their profiles and provide some personal data. On a user's button click, I want to open a new window and show some page that is hosted on another...
1
by: slavisa | last post by:
Hi, i have a form and i use cgi script to email the results back to me. I have a javascript in there already that checks if the required fields are filled when you click submit and if they are not...
4
by: MichaelK | last post by:
Hello. I have all data already collected on the current page? I want to open another window with the form, fill the fields and submit that form. So basically the question is how can I fill all...
6
by: smk17 | last post by:
I've spent the last few minutes searching for this question and I found an answer, but it wasn't quite what the client wanted. I have a simple online form where the user needs to fill out five...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.