Link to home
Start Free TrialLog in
Avatar of GaryZ
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.href,'wx','700','400','yes','center');return false" >Click Here</a> to generate this section.
ASKER CERTIFIED SOLUTION
Avatar of melbor1
melbor1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GaryZ
GaryZ

ASKER

I had tried that, instead of sending the value of the field it sends the name of the field
Avatar of GaryZ

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.
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('Document?OpenForm&' + document.forms[0].fld_1.value + ',' + document.forms[0].fld_2.value)  ">

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].State.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.