SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2005
    Posts
    527
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A tag that works only in new window !

    How can I creat a link that open a url when we use "open in new tab / window from browser menu" and when we click on self page just run a javascript function not redirect.

    I want create some links that when we click on them update some parts of pages with Ajax and disable redirecting and when we click open in new window it redirect (I saw some sample in web)

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,117
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Isn't that how it functions by default?

    <a href="somewhere.php">Go Somewhere</a>

    If you setup a listener on the click event of this link, at least in Firefox doesn't it open 'somewhere.php' in a new tab if you click the scroll wheel(or right click > open in new tab)?

    Do you have href="#" by any chance?


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
  •