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 to the CF scene
    Join Date
    Mar 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help with opening external links

    Hello fellow developers, Am working on a website and want to control the number of external links that can be opened at a time. For example, i can open two links a new tabs but i should not open more than three. Kindly let me know if this can be done and how. I will appreciate any response

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,303
    Thanks
    203
    Thanked 2,562 Times in 2,540 Posts
    It is not possible to do that with a Javascript program.

    JavaScript has no capability to access the client's operating system or the Windows registry, or alter the default behaviour of the browser.
    You could restrict the number of links clicked on to some number, but there is no way to detect that a window or tab has been closed, so no way to impose a limit on the number of wondows/tabs open at the same time.

    It is possible for users to obtain browser add-ons to limit the number of windows/tabs open at one time.

    Example:- http://www.chromestory.com/2010/04/h...pen-on-chrome/


    All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
    Last edited by Philip M; 03-16-2013 at 11:39 AM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.


  •  

    Tags for this Thread

    Posting Permissions

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