Results 1 to 5 of 5

Thread: Pop-Up Window Generator / On Image

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pop-Up Window Generator / On Image

    I am using this link http://www.dynamicdrive.com/dynamicindex8/popwin.htm for the pop up window, i wanted to get it to work by clicking on an image... any ideas?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    HTML Code:
    <a href="http://www.google.com" onclick="NewWindow(this.href,'mywin','300','200','no','center');return false" onfocus="this.blur()"><img src="some.gif" border="0"></a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2006
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    HTML Code:
    <a href="http://www.google.com" onclick="NewWindow(this.href,'mywin','300','200','no','center');return false" onfocus="this.blur()"><img src="some.gif" border="0"></a>
    I want the reader to have the ability to close the pop-up window once they finished reading it by click on a the words "Close Window" at the bottom section of the page. How do i do that?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by terkini
    I want the reader to have the ability to close the pop-up window once they finished reading it by click on a the words "Close Window" at the bottom section of the page. How do i do that?
    Well, if it is your own page, put this at the bottom:

    HTML Code:
    <a href="#" onclick="self.close();return false;">Close Window</a>
    If it is someone else's page, you are out of luck unless you can get them to put that code on their page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Better yet, put this script at the bottom of the page:

    Code:
    <script type="text/javascript">
    if(this.opener)
    document.write('<a href="#" onclick="self.close();return false;">Close Window</a>')
    </script>
    That way, if the page is reached via another method other than javascript, the link to close it won't be displayed as, it wouldn't work anyway.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •