Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2007
    Location
    Herne Bay, Kent, England
    Posts
    182
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Mar 2006
    Location
    Fresno, California
    Posts
    621
    Plugin Contributions
    0

    Default Re: How do you close a popup?

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

  3. #3
    Join Date
    Sep 2007
    Location
    Herne Bay, Kent, England
    Posts
    182
    Plugin Contributions
    0

    Default Re: How do you close a popup?

    Quote Originally Posted by bobdog View Post
    <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?

  4. #4
    Join Date
    Mar 2006
    Location
    Fresno, California
    Posts
    621
    Plugin Contributions
    0

    Default 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>

  5. #5
    Join Date
    Sep 2007
    Location
    Herne Bay, Kent, England
    Posts
    182
    Plugin Contributions
    0

    Default Re: How do you close a popup?

    Quote Originally Posted by bobdog View Post
    <a href="javascript:window.close();"><img src="images/my_image.jpg" alt="" width="25" height="10" border="0"></a>
    Brilliant!! Thank you.

 

 

Similar Threads

  1. How to disable 'click to close' popup?
    By yamitenshi in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Feb 2009, 02:35 AM
  2. Popup image not centered in popup box
    By webbydeb in forum General Questions
    Replies: 5
    Last Post: 25 Oct 2008, 08:59 AM
  3. Anyone know how to close this gap...?
    By first trading in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 7 Sep 2008, 10:18 PM
  4. popup wont close on click
    By ebaobao in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 1 Sep 2008, 06:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •