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

parent.location.href problem

Status
Not open for further replies.

IndyFusion

Programmer
Jan 9, 2003
7
0
0
US
Okay, I feel like a total idiot now. I am opening a modal dialog window and in the dialog I'm trying to change the location.href of the parent window. When I try parent.location.href = 'blah.htm'; it opens a new window with blah.htm inside. Why is it opening in a new window?

Thanks,
Jason
 
i don't believe you're allowed to access the parent window from modal/modeless dialogs - in fact, i think the parent is in fact the dialog itself.

dialogs are meant to send back a return value:
var returnVal = window.showModalDialog();
// do something with returnVal here =========================================================
if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top