Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a value generated in child window

Status
Not open for further replies.

JNB

Programmer
Jul 25, 2000
4
US
I have a function which generates a new window with multiple hyperlinked values displayed. When the user selects a value, it is returned to the original form in a specified <INPUT> field.
I now need to have the page react to this new value; ie, if the user just types a value into the field instead of using the pop-up window, the form is submitted onChange and the panel redisplayed with the appropriate changes made based on the input value. This way I can have the page &quot;dynamically&quot; display the most recent data-set based on the input. So how would I go about following up the getVals function to implement the updtWin function?

entering <INPUT> value code (produces the desired result):
function updtWin(newVal) {
var URLstr4 = &quot;REDISPLAY?cy=$(cy)&fldchgd=&quot; + newVal.name
document.posnUpdt.action=URLstr4;
document.posnUpdt.submit();
}

<form method=&quot;post&quot; name=&quot;posnUpdt&quot;>
...
<input type=&quot;text&quot; name=&quot;DEPTID&quot; size=&quot;10&quot; maxlength=&quot;10&quot;
onChange='updtWin(this)'>
...
</form>


pop-up window code (now what??):
function getVals() {
var argvals2 = getVals.arguments;
var URLstr2 = &quot;QRYFRAMES?frmnm=&quot; + argvals2[0] + &quot;&tblnm=&quot; + argvals2[1]
URLstr2 += &quot;&fldnm=&quot; + argvals2[2] + &quot;&srchfld=&quot; + argvals2[3]
var qfrm = window.open(URLstr2,'qryframes','width=450,height=490');
}

--> eventually returns value to argvals2[2] parameter in posnUpdt <--

<form method=&quot;post&quot; name=&quot;posnUpdt&quot;>
...
<input type=&quot;BUTTON&quot; VALUE=&quot;DeptIDs&quot; HEIGHT=&quot;25&quot; WIDTH=&quot;34&quot;
onClick='javascript:getVals(&quot;posnUpdt&quot;,&quot;PS_DEPT_TBL&quot;,&quot;DEPTID&quot;,&quot;DeptID&quot;)'>
...
</form>
 
onChange in popup use something like window.opener.popupUpdate
 
Unfortuantely, Mr Dubner's response means little to me. Can somebody else PLEASE offer me some assistance!?!?!
 
Okay, I'll try one more time to see if the whizzes out there can answer this one for me. I REALLY REALLY need to find a solution, so if you can help, thanks much...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top