473,395 Members | 1,457 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,395 software developers and data experts.

Help please with form field population from a 2nd page

Help please.
I am trying to autofill a form text field from a select-box lookup.
I have no problem doing this if the select-box is part of the form
but because there are 5 possible select boxes for them to choose
from and because of the very large number of options in each
select box, to save form loading time, I want to put the look-up
select boxes on separate (pop-up) pages. (I prefer them not to
be hidden divs on the same page)

Here is the code I have so far:

THE FORM
<FORM NAME="ListingForm" action="path-to-sendmail.cgi" method="post"
onsubmit="CheckForm()">

<input type="text" size="60" name="showValue" style="FONT-SIZE: 8pt; HEIGHT:
12pt">

LOOKUP OPTIONS (Links within the form)

<A HREF= "#" onClick="window.open('Lookup/honours.html','Sample',
'toolbar=no,width=520,height=550,left=10,top=10, status=no,scrollbars=no,
resize=no');return false"><font style=FONT-SIZE:8pt>HONOURS & AWARDS</A>

<A HREF= "#" onClick="window.open('Lookup/decorations.html','Sample',
'toolbar=no,width=520,height=550,left=10,top=10, status=no,scrollbars=no,
resize=no');return false"><font style=FONT-SIZE:8pt>DECORATIONS</A>

(There are three more options)

etc etc submit etc </form>

ONE OF THE POP-UP'S - Lookup/honours.html

<select name="Honours"
onchange="document.ListingForm.showValue.value=thi s.value">

<option value="">Please select an option</option>

<option value="Medal Name 1">Medal Name 1</option>

<option value="Medal Name 2">Medal Name 2</option>

<option value="Medal Name 3">Medal Name 3</option>

<option value="Medal Name 4">Medal Name 4</option></select>

As stated. When the "select box resides in the form, the

text box - 'showValue' populates correctly but it will not do so from

the popped-up page. How can I link the five lookup pages to the form
please???

All help gratefully received
Apr 29 '07 #1
2 2568
On Apr 29, 9:23 pm, "Richard" <s...@justmedals.comwrote:
Help please.
I am trying to autofill a form text field from a select-box lookup.
I have no problem doing this if the select-box is part of the form
but because there are 5 possible select boxes for them to choose
from and because of the very large number of options in each
select box, to save form loading time, I want to put the look-up
select boxes on separate (pop-up) pages. (I prefer them not to
be hidden divs on the same page)

Here is the code I have so far:

THE FORM
<FORM NAME="ListingForm" action="path-to-sendmail.cgi" method="post"
onsubmit="CheckForm()">

<input type="text" size="60" name="showValue" style="FONT-SIZE: 8pt; HEIGHT:
12pt">

LOOKUP OPTIONS (Links within the form)

<A HREF= "#" onClick="window.open('Lookup/honours.html','Sample',
'toolbar=no,width=520,height=550,left=10,top=10, status=no,scrollbars=no,
resize=no');return false"><font style=FONT-SIZE:8pt>HONOURS & AWARDS</A>

<A HREF= "#" onClick="window.open('Lookup/decorations.html','Sample',
'toolbar=no,width=520,height=550,left=10,top=10, status=no,scrollbars=no,
resize=no');return false"><font style=FONT-SIZE:8pt>DECORATIONS</A>

(There are three more options)

etc etc submit etc </form>

ONE OF THE POP-UP'S - Lookup/honours.html

<select name="Honours"
onchange="document.ListingForm.showValue.value=thi s.value">

<option value="">Please select an option</option>

<option value="Medal Name 1">Medal Name 1</option>

<option value="Medal Name 2">Medal Name 2</option>

<option value="Medal Name 3">Medal Name 3</option>

<option value="Medal Name 4">Medal Name 4</option></select>

As stated. When the "select box resides in the form, the

text box - 'showValue' populates correctly but it will not do so from

the popped-up page. How can I link the five lookup pages to the form
please???

All help gratefully received
you have to tell the popped up window which page opened it, then send
the data there.
so in the pop up

function setvalue(formname,inputname)
{
var mainpage = window.opener;
//now set value of which select you need
mainpage.formname.inputname......
}

so when user clicks the drop down in the pop up, send tha selected
value to the function which sends it on to the input within the form
in the opener

Apr 30 '07 #2
On Apr 30, 1:14 am, shimmyshack <matt.fa...@gmail.comwrote:
On Apr 29, 9:23 pm, "Richard" <s...@justmedals.comwrote:
Help please.
I am trying to autofill a form text field from a select-box lookup.
I have no problem doing this if the select-box is part of the form
but because there are 5 possible select boxes for them to choose
from and because of the very large number of options in each
select box, to save form loading time, I want to put the look-up
select boxes on separate (pop-up) pages. (I prefer them not to
be hidden divs on the same page)
Here is the code I have so far:
THE FORM
<FORM NAME="ListingForm" action="path-to-sendmail.cgi" method="post"
onsubmit="CheckForm()">
<input type="text" size="60" name="showValue" style="FONT-SIZE: 8pt; HEIGHT:
12pt">
LOOKUP OPTIONS (Links within the form)
<A HREF= "#" onClick="window.open('Lookup/honours.html','Sample',
'toolbar=no,width=520,height=550,left=10,top=10, status=no,scrollbars=no,
resize=no');return false"><font style=FONT-SIZE:8pt>HONOURS & AWARDS</A>
<A HREF= "#" onClick="window.open('Lookup/decorations.html','Sample',
'toolbar=no,width=520,height=550,left=10,top=10, status=no,scrollbars=no,
resize=no');return false"><font style=FONT-SIZE:8pt>DECORATIONS</A>
(There are three more options)
etc etc submit etc </form>
ONE OF THE POP-UP'S - Lookup/honours.html
<select name="Honours"
onchange="document.ListingForm.showValue.value=thi s.value">
<option value="">Please select an option</option>
<option value="Medal Name 1">Medal Name 1</option>
<option value="Medal Name 2">Medal Name 2</option>
<option value="Medal Name 3">Medal Name 3</option>
<option value="Medal Name 4">Medal Name 4</option></select>
As stated. When the "select box resides in the form, the
text box - 'showValue' populates correctly but it will not do so from
the popped-up page. How can I link the five lookup pages to the form
please???
All help gratefully received

you have to tell the popped up window which page opened it, then send
the data there.
so in the pop up

function setvalue(formname,inputname)
{
var mainpage = window.opener;
//now set value of which select you need
mainpage.formname.inputname......

}

so when user clicks the drop down in the pop up, send tha selected
value to the function which sends it on to the input within the form
in the opener
further info in post " Cannot get child to feed the parent!" 30th april

Apr 30 '07 #3

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

Similar topics

9
by: Don Seckler | last post by:
I am trying to set up a PHP web page so I can enter data into a database. I created a form: <form action="admin_news_insert_processor.php" method="post" name="frm_Insert_News"...
46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
14
by: TrvlOrm | last post by:
OK. After much playing around, I managed to get my frame page this far.. see code below. BUT...there are still errors with it, and what I would like to have happened is this: 1) On the Left...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
1
by: John Phelan-Cummings | last post by:
I'm not certain if this made the post. Sorry if it's a repeat: Using a Button to take an autonumber from one form to populate another autonumber field on another form. I have a Mainform "A"...
3
by: Mike | last post by:
I have a web page that displays contact people in a drop down. the users selects a person then clicks the go button. The datagrid should pop with all the information on the select contact person,...
20
by: Dj_TRuST | last post by:
This is my homework and i couldn't do it,please help me. I wait your helpsss On the planet Zephod, which orbits the star Betelgeuse, the sharks increase at a rate of 5% of the guppy population...
5
by: aaragon | last post by:
Hello everybody, I appreciate your taking the time to take a look at this example. I need some help to start the design of an application. To that purpose I'm using policy-based design. The...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.