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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opener, frames and holding my breath!!

Status
Not open for further replies.

w11z

Programmer
Mar 26, 2001
40
CA
Hello everyone,

I'll try simplify my problem...

Situation : I have a page in which there is a textbox (called "grandTotal") and a button. When I click the button, a popup window opens(frameset - top and bottom frames).

On the top frame there is a textbox (where the user enters a number) and a button (called "next").

On the bottom frame appears the numbers entered in the top frame (after the user has pressed the button "next") and the sum of all the numbers entered.

Problem : On a button click (part of the bottom frame), how do I send the sum to the textbox "grandTotal"?

I have tried the object opener but since I'm using frames I can't seem to make it work!

Any suggestions!

W11Z
 
use the parent object to refer to the frameset window, you could if you want call a script that then uses the opener object to reference the openeing page and then from there you can use:

in your bottom frame include the following line to call a script in the frameset
window.parent.setGrandTotal()

in the frameset in the head tag put:

<script>
function setGrandTotal()
{
window.opener.formName.TextBoxName.value = someval
}


}

 
Thank you sjravee,

But I found that even when a page calls up a frameset (containing 2 or more frames) the opener object still refers to the original page. So when sending back the value I have tried : window.parent.opener.document.formName.fieldName.value=document.formName.fieldName.value;

And it worked fine.

Thanks again

w11z
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top