This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > February 2006 > How do I CLOSE a popup window then LINK to another page?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How do I CLOSE a popup window then LINK to another page?
Canned Heat

2006-02-24, 10:16 pm


Example:

-Two normal html pages: A and B
-Page A has a link that opens op a popup window, 350 wide
-Page A also has a link to page B
-If the user clicks the link to page B, I do not want to have it open
in the 350 window. I want it to normally open.

How do I create a double action - that when a person clicks on link to
page B, it first closes the popup window then links to page B

Hope that made sense.

Thanks.
Nancy Gill

2006-02-24, 10:16 pm

> -If the user clicks the link to page B, I do not want to have it open
> in the 350 window. I want it to normally open.
>


make sure the target is _self.

> How do I create a double action - that when a person clicks on link to
> page B, it first closes the popup window then links to page B


you can create a JavaScript function so the link is <a
href="java script:myfunction()">

and then the function, which goes enclosed in JavaScript script tags, in the
head of the document ..

function myfunction {
window.close();
window.open("pageb.html", "newwindow", "height=100,width=300")
}

may not be quite the right syntax, but it's close.


--
Nancy Gill
Team Macromedia Volunteer for Dreamweaver MX/UltraDev
http://www.macromedia.com/go/team/
BLOG: http://www.dmxwishes.com/blog.html
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development


>
> Hope that made sense.
>
> Thanks.



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews