Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    california
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how do I put a close button in a popup window

    I have got a few pop up windows on my web page but I want to add to the popup window the abilty to click either a button or a link [click to close] to be able to close the window.

    Thanks

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    <form>
    <input type="button" value="Close" onClick="self.close()">
    </form>

    or

    <a href="javascript:self.close();">Close</a>
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

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