ap_sajith
asked on
window.opener issue
Hi all,
I have this problem..
I have this page (home.asp) which opens up a popup, which has clickable links... on clicking the link, i am minimizing the popup and calling a function in the opener window ie, home.asp. The function in the homepage redirects the page to view.asp to view the details. Now the problem starts... i go back to the popup and click the next link... this does no action as the window.opener has changed its location. I even tried adding the function in the home page in view.asp.. but still dosnt pick it...
Any ideas as to how to go about this..
Do let me know if you need any further details..
Thanks to all in advance :o)
Cheers!!
I have this problem..
I have this page (home.asp) which opens up a popup, which has clickable links... on clicking the link, i am minimizing the popup and calling a function in the opener window ie, home.asp. The function in the homepage redirects the page to view.asp to view the details. Now the problem starts... i go back to the popup and click the next link... this does no action as the window.opener has changed its location. I even tried adding the function in the home page in view.asp.. but still dosnt pick it...
Any ideas as to how to go about this..
Do let me know if you need any further details..
Thanks to all in advance :o)
Cheers!!
ASKER
I open the popup from the home page... and then on clicking the link in the pop up, the parent window (currently displaying home.asp) has to be redirected to view.asp. Now i go back to the popup (the parent window currently displays view.asp or any of the other pages the user has navigated to!!) and click on the link again.. now the script in the popup does not recognise the window.opener argument anymore...
Cheers!!
Cheers!!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
typo - forgot to close the onclick
<a href="#" onClick="redirectParent('http://www.google.com/') ; return false">Google</a>
<a href="#" onClick="redirectParent('http://www.google.com/')
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@Jester.. That wouldnt work.. anyway.. i cant use absolute URLS as well..
@VincentPuglia, I cant use popups or frames...I tried using the function in the popup itself.. however, the same problem with the window not recognising the parent window arose...
Any other ideas?
Cheers!!
@VincentPuglia, I cant use popups or frames...I tried using the function in the popup itself.. however, the same problem with the window not recognising the parent window arose...
Any other ideas?
Cheers!!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi ap_sajith
Ok, you can't use popups & frames. & you 'must' redirect the opener. & you must access view.asp through the popup (not leaving yourself many choices, huh? :)
Flynnious may have something there:
Try this in the popup :
var viewPage = opener;
viewPage.location = "view.asp"
then in the popup have the functions and try accessing the view.asp with:
alert(viewPage.document.fo rms[0].nam e)
Vinny
Ok, you can't use popups & frames. & you 'must' redirect the opener. & you must access view.asp through the popup (not leaving yourself many choices, huh? :)
Flynnious may have something there:
Try this in the popup :
var viewPage = opener;
viewPage.location = "view.asp"
then in the popup have the functions and try accessing the view.asp with:
alert(viewPage.document.fo
Vinny
ASKER
I'll give these a shot... In the meantime.. if anyone else has anyother ideas, then please post your ideas...
Cheers!!
Cheers!!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for you input guys.. I think i have solved the problem..
I moved the function used to navigate to the new page from the home page to the topbar include file so that all the pages will heve that function...
<FORM NAME="frmNavigate" METHOD="POST">
<INPUT TYPE="Hidden" NAME="EventID">
</FORM>
<script>
function Navigate(EventID)
{
document.frmNavigate.actio n="viewEve nt.asp"
document.frmNavigate.Event ID.value=E ventID;
document.frmNavigate.submi t();
}
</script>
And in the Popup page, i am using..
<script>
function viewEvent(EventID)
{
window.self.blur();
window.opener.focus();
window.opener.Navigate(Eve ntID);
}
</script>
That did the trick... Thanks to all of you who has come up valuable suggestions.. I guess i would split up the points among you guys...
Cheers!!
I moved the function used to navigate to the new page from the home page to the topbar include file so that all the pages will heve that function...
<FORM NAME="frmNavigate" METHOD="POST">
<INPUT TYPE="Hidden" NAME="EventID">
</FORM>
<script>
function Navigate(EventID)
{
document.frmNavigate.actio
document.frmNavigate.Event
document.frmNavigate.submi
}
</script>
And in the Popup page, i am using..
<script>
function viewEvent(EventID)
{
window.self.blur();
window.opener.focus();
window.opener.Navigate(Eve
}
</script>
That did the trick... Thanks to all of you who has come up valuable suggestions.. I guess i would split up the points among you guys...
Cheers!!
ASKER
I am using the form post method rather than the window.navigate method as the popup window is called from a different subfolder and i cannote pass the absolute url. If i used window.navigate, then the url is appended with the pop ups' folder path.. thereby generating a 404 error.
Cheers!!
Cheers!!
thanks, glad you found my input useful
Thamks for the points.
ASKER
you guys deserve it.. thanks a lot..
Cheers!!
Cheers!!
does it helping you.?