0

This is what I want to accomplish..I created a pop up window from my original document. this is the code..

<script type="text/javascript">
 function subscribe() {
 window.open("cover.htm", "popWin", "width=125, height=240, left=10, screenX=10, top=10, screenY=10");
 }
 </script>

I called the function when the window loads. Now in the the pop up I want to click on a link that will open another htm file in the original window. I know i have to use the opener keyword but don't know how to go about doing this.

any suggestion will be greatly appreciated..

CoolBeans
20.9k11 gold badges88 silver badges102 bronze badges
asked Apr 7, 2011 at 3:29

2 Answers 2

1

This seems to be a great article for what you are looking to do.

answered Apr 7, 2011 at 3:38
Sign up to request clarification or add additional context in comments.

1 Comment

Couldn't quite get that article
0

You can set a function on the parent page to change the location, then use the window.opener to access it.

Parent Page

function changeParentURL(url) {
 document.location=url;
}

Child Page

window.opener.changeParentURL('http://new.htm');
answered Apr 7, 2011 at 3:42

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.