In my project I have a product page.Let's assume this is parent page.Now if I click on a button then a pop up page opens.After filling a form if I click on a button in child pop up then my requirement is the parent page should get redirected to another url.It
should not open any new tab or window.In same window and same tab the reditection should happen.
How can I acchieve this using javascript.Please give a the complete snippet.
biswanath.ch...
Member
17 Points
30 Posts
How to redirect parent page from child Pop Up
Dec 29, 2012 09:26 AM|LINK
Hi,
In my project I have a product page.Let's assume this is parent page.Now if I click on a button then a pop up page opens.After filling a form if I click on a button in child pop up then my requirement is the parent page should get redirected to another url.It should not open any new tab or window.In same window and same tab the reditection should happen.
How can I acchieve this using javascript.Please give a the complete snippet.
Sujeet Saste
Contributor
3008 Points
572 Posts
Re: How to redirect parent page from child Pop Up
Dec 29, 2012 09:52 AM|LINK
Hi,
You can not navigate Parent page from child page, because it has no control on Parent page.
You can achieve it by using ModalPopUp Extender instead of you Popup child page.
You will find Ajax Modal popup on below link.
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx
Do FEAR (Face Everything And Rise)
Please mark as Answer if my post helps you..!
My Blog
urenjoy
Star
12171 Points
1824 Posts
Re: How to redirect parent page from child Pop Up
Dec 29, 2012 10:04 AM|LINK
Check following:
http://forums.asp.net/t/1786639.aspx/1
http://stackoverflow.com/questions/2257154/redirect-from-pop-up-window
biswanath.ch...
Member
17 Points
30 Posts
Re: How to redirect parent page from child Pop Up
Dec 31, 2012 03:45 AM|LINK
Hi,
This works fine but the issue is in IE it's opening a new tab.My requirement is the redirection should happen in same tab of parent window.
raju dasa
Star
14392 Points
2447 Posts
Re: How to redirect parent page from child Pop Up
Dec 31, 2012 04:24 AM|LINK
Hi,
Check these sites:
http://stackoverflow.com/questions/5049171/how-to-close-popup-window-and-redirect-the-parent-window
http://www.sitepoint.com/forums/showthread.php?701913-Close-Popup-Redirect-Parent-to-New-Link
rajudasa.blogspot.com || blog@opera
biswanath.ch...
Member
17 Points
30 Posts
Re: How to redirect parent page from child Pop Up
Dec 31, 2012 04:59 AM|LINK
Sir,
The issue is with IE.in all the snippets window.opener.location.href is used.This opens a new tab in IE.I want this to happen in current tab only
raju dasa
Star
14392 Points
2447 Posts
Re: How to redirect parent page from child Pop Up
Dec 31, 2012 05:07 AM|LINK
Hi,
I tried this simple code, its working fine in IE9.
parent:
<!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>JS Bin</title> </head> <body> <button onclick="window.open('test_child.html')">Open Popup</button> </body> </html>and Child:
which browser you are using? can u modify above code to replicate ur issue?
rajudasa.blogspot.com || blog@opera