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

How to go back to Parent Page from Child?

Status
Not open for further replies.

nomi2000

ISP
Feb 15, 2001
676
CA
Hi guys
I have a child page (POPUP) say CHILD.aspx this same page could be called from two parent pages say PARENT1.ASPX and PARENT2.ASPX what i need to achieve is on CHILD.ASPX i want to go back to the parent page from where this POPUP is called
Regards
Nouman
The following code is working for me on CHILD.ASPX but u can see PARENT1.aspx is hard-coded where i want to user URL of the page from where this CHILD popup is called
Dim sScript As String = ""
sScript += "<script language=javascript>"
sScript += "opener.location.href=PARENT1.aspx';"
sScript += "window.close();"
sScript += "</script>"
Response.Write(sScript)

Nouman Zaheer
Software Engineer
MSR
 
location = window.opener.document.location;

This bit of js code fired in a child window will move the location to the location of the opening window.

-p

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Thanks Link9
One more question is it possible to hide the bar which have Close,Minimize and Restore Icons? so user can only close the page with a link or button present on the child popup window
Thanks
Nouman

Nouman Zaheer
Software Engineer
MSR
 
Not that I know of. That would constitute a security issue in my book (and in the browser, too, I think).

-p

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Thanks
Ok if its not possible so is it possible to catch the event which firest when user click the CROSS button in the bar?
so i can write the same code in that event
Regards
Nouman

Nouman Zaheer
Software Engineer
MSR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top