Re: Help please with form field population from a 2nd page



On Apr 29, 9:23 pm, "Richard" <s...@xxxxxxxxxxxxxx> wrote:
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=this.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

.



Relevant Pages

  • Re: Repost: My Filtering Question
    ... I built the combo boxes for the two text fields, ... without the lookup wizard. ... > the wizard ON THE FORM to build a combo box. ...
    (microsoft.public.access.forms)
  • Re: Repost: My Filtering Question
    ... did you build those combo boxes, or are you using the built in lookup ... At this point you might be able to continue to use the horrible lookup ... the combo box wizard on the form to create the combo. ... to see some screen shots of what continues forms look like..and NOT use ...
    (microsoft.public.access.forms)
  • Re: Questionnaires
    ... stored in lookup tables and may use yes/no boxes or memo fields. ... yes/no boxes within a single record (or the whole idea of one field ...
    (microsoft.public.access.forms)
  • SBS service gone crazy - need help, badly
    ... boxes, ... we have an external domain, ... on the outside dns servers, there is a record *.company.com pointing to ... on the sbs box, ns lookup returns yahoo.com.company.com, returning our ...
    (microsoft.public.windows.server.sbs)
  • SQL statement to populate unbound textbox
    ... I have a table that I am using as a lookup to populate a table with info ... the text boxes are set as unbound boxes. ... My pitiful SQL statement applied as the Control Source to each unbound text ...
    (microsoft.public.access.forms)