|
-
January 31st, 2006, 11:46 AM
#1
URGENT! PLEASE HELP: Change main web page from popup?
Hi,
My main web page creates the below popup. I want to click a link in my popup and have my main web page go to the url. I do not care if the popup remains open at that point or not (I'd rather it close actually).
How do I do this?
HTML Code:
<map name="Map">
<area shape="rect" onmouseover="ChangeCursor();" onmouseout="ChangeCursorBack();" coords="295, 72, 445, 95" target="_blank" style="cursor:hand" onclick="var myWindow = window.open('Flash/treeredone.asp','ORGCHART','height=600,width=800,top=0,left=0,scrollbars=no');">
</map>
I wish I was as smart as I am confused...argh!
-
January 31st, 2006, 02:56 PM
#2
Re: URGENT! PLEASE HELP: Change main web page from popup?
Your pop-up's target would simply have to point to the opener. That isn't enough code for me to see what you are doing .. is that opening the pop-up, or is that code on the pop-up ... please explain.
*9-11-01* Never Forget; Never Forgive; Never Relent!
"If we ever forget that we're one nation under God, then we will be a nation gone under." - Ronald Reagan
-
February 1st, 2006, 08:16 AM
#3
Re: URGENT! PLEASE HELP: Change main web page from popup?
Hello, thank you for your reply.
The code in the snippet is in the opener. In other words, the code in the snippet opens the popup.
What would the code in the popup look like to change the opener's page ?
I wish I was as smart as I am confused...argh!
-
February 1st, 2006, 09:37 AM
#4
Re: URGENT! PLEASE HELP: Change main web page from popup?
Here is a basic version
Code:
<script type="text/javascript">
function winopen(){
win = window.open('','_blank');
win.document.open;
win.document.write('<a href="javascript:" onclick="opener.location=\'http://www.google.com\'">click</a>')
win.document.close();
}
</script>
<a href="javascript:" onclick="winopen()">click</a>
-
February 7th, 2006, 09:20 AM
#5
Re: URGENT! PLEASE HELP: Change main web page from popup?
U can access the main page's elements from the popup by
simply replacing 'document.something' in main page's JS with 'window.opener.document.something' in popup page's JS.
a sample code would look like
window.opener.projForm.search2.value="done";
I hope this is the relevant answer
Last edited by amitvb; February 7th, 2006 at 09:22 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|