GaryZ
asked on
Passing a parameter
I have the following code in a Notes form to create a popup window. The popup window sends some values back to the original form, no problem, however, I need to now pass a value to the popup window, but I am having no luck.
<a href="F2?OpenForm" onclick="NewWindow(this.hr ef,'wx','7 00','400', 'yes','cen ter');retu rn false" >Click Here</a> to generate this section.
<a href="F2?OpenForm" onclick="NewWindow(this.hr
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The problem is I did not state this correctly.
Form 1 has a field named State with a value of OH.
When I do the F2?OpenForm I need to pass the value of the field to the next form.
Form 1 has a field named State with a value of OH.
When I do the F2?OpenForm I need to pass the value of the field to the next form.
melbor1 is right. It is the best method to go about.
As far as you passing the name of the field, use javascript to grab the value of the field to be passed.
Like this
<input type=button name="Open New Window" onClick="window.open('Docu ment?OpenF orm&' + document.forms[0].fld_1.va lue + ',' + document.forms[0].fld_2.va lue) ">
And then extract the field values by using query_string field, which will be hidden
~Hemanth
As far as you passing the name of the field, use javascript to grab the value of the field to be passed.
Like this
<input type=button name="Open New Window" onClick="window.open('Docu
And then extract the field values by using query_string field, which will be hidden
~Hemanth
You can also use the opener object and directly reference the value on the parent window from the popup window.
for example:
on the parent document:
<input type="value="OH">
on the popup form, you get the value of the field by referencing:
opener.document.forms[0].S tate.value
OR
opener.document.<insert form name here>.State.value
This should get put inside a JavaScript function and be called from whatever event you want to have retrieve the value.
for example:
on the parent document:
<input type="value="OH">
on the popup form, you get the value of the field by referencing:
opener.document.forms[0].S
OR
opener.document.<insert form name here>.State.value
This should get put inside a JavaScript function and be called from whatever event you want to have retrieve the value.
ASKER