Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How do you close a popup?

How do you close a popup?

Locked

Views: 987

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
23 Mar 2009, 12:37 PM
#1
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

How do you close a popup?

Hi.

I've created some popup windows to give essential information for my site. I've used Javascript to define the window size and html for the layout. (I'm still at the basic level for both)!

I'd like to include a button to close the windows, but can't work out how to do it.

Can anyone help please.

Thanks in advance.

Philip

23 Mar 2009, 4:30 PM
#2
bobdog avatar

bobdog

Totally Zenned

Join Date:
Mar 2006
Location:
Fresno, California
Posts:
590
Plugin Contributions:
0

Re: How do you close a popup?

<form> <input type=button value="Close This Window" onClick="javascript:window.close();"> </form>
23 Mar 2009, 4:37 PM
#3
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

Re: How do you close a popup?

bobdog:

<form> <input type=button value="Close This Window" onClick="javascript:window.close();"> </form>

Great! Thanks very much. Now, can I use a custom button to match the site?

23 Mar 2009, 4:59 PM
#4
bobdog avatar

bobdog

Totally Zenned

Join Date:
Mar 2006
Location:
Fresno, California
Posts:
590
Plugin Contributions:
0

Re: How do you close a popup?

<a href="javascript:window.close();"><img src="images/my_image.jpg" alt="" width="25" height="10" border="0"></a>

23 Mar 2009, 5:04 PM
#5
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

Re: How do you close a popup?

bobdog:

<a href="javascript:window.close();"><img src="images/my_image.jpg" alt="" width="25" height="10" border="0"></a>

Brilliant!! Thank you.