SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question hotkey plugin opens new window even if pop-up are blocked?

    hi

    I am using jsTree.com with hotkeys plugin. I want to use "F3" key to open the node's url in new window.

    Below code works if pop-up blocker is not on in ff & IE. And every time in chrome. When I turn the popup blocker off it works in ff too.

    I wonder how I can modify my javascript function to it works always. So it works like clicking "the example.com website (opens in a new window)." the link in JavaScript target demo

    I believe it can be done but js knowledge and experience is limited.


    Thanks for any suggestions.

    R

  2. #2
    SitePoint Member
    Join Date
    May 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
                hotkeys: {
                    "f3" : function () {
                    url = "http://www.vse.cz";
                    var newWindow = window.open(url, '_blank');
                    newWindow.focus();
                    return false;
    
                },


Tags for this Thread

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
  •