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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Posts
    264
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Popup-Top of page

    Hi I want to use this code for a pop-up but I dont want it to go to the top of the page when you click on it thanks

    <a href="#" onclick="openSizedWindow('step7.html');"><img src="step7.gif" width="100" height="100" border="0"></a>
    Please visit http://www.thickandthinpizza.com and tell me what you think.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <a href="step7.html" onclick="openSizedWindow(this.href); return false;">
    <img src="step7.gif" width="100" height="100" border="0">
    </a>
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    or

    Code:
    <a href="#" onclick="openSizedWindow('step7.html'); return false;">
    <img src="step7.gif" width="100" height="100" border="0">
    </a>
    which is bassically the same thing. The key role is return false which prevent any scroll movement, as it would have been happen when using a href="#" .

    you may use either:

    Code:
    <a href="javascript:void(openSizedWindow('step7.html'); return true;)">
    <img src="step7.gif" width="100" height="100" border="0">
    </a>
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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