www.webdeveloper.com
Results 1 to 4 of 4

Thread: links set to open in new window, are being treated as a pop-up under chrome?

  1. #1
    Join Date
    Nov 2013
    Posts
    3

    links set to open in new window, are being treated as a pop-up under chrome?

    Title: When I try to click and launch some of the links set to open in new window, it is being treated as a pop-up window under chrome.

    Hi all,

    For the past few days, we are facing issue with the chrome browser behavior. This is related to opening links set to open in new tab/window. The details are as follow:

    I have a collection of links and each link points to different resource to be opened in a new tab/window. The code is as follow:

    <a class="cssClass" rid="1114931" href="http://www.domain.com/resources/abc.html" title="Link1" tabindex="4">Link 1</a>

    And there are few checks/filters over accessing the resources which have been implemented as onClick handler over the links. In case any of the validations fails, the onClick handler returns false and the default behavior of the link does not happens i.e. links does not get open.

    One of such (last) checks includes AJAX call in sync mode. The code is as follow:

    ....
    ....

    var link_clickHandler = function(evt/* Event */) {
    var objTarget = jQuery(evt.target);

    if(check1) {
    return false;
    }
    else if(check2) {
    return false;
    }
    else if(check3) {
    var blnRetVal = false;

    jQuery.ajax( {
    "async" : false,
    "type" : "GET",
    "contentType" : "application/json; charset=utf-8",
    "url" : "index.php",
    "data" : 'resourceid=' + intResourceId,
    "dataType" : "json",
    "forceData" : true,
    "success" : function(data) {
    if(check1) {
    blnRetVal = true;
    }
    }
    "error" : function(error) {
    }
    } );

    return blnRetVal;
    }
    };

    jQuery("a.cssClass").live("click", link_clickHandler);


    ISSUE: The issue is that Chrome is behaving very weirdly manner. In case all of the checks are passed and onClick handler returns true, sometimes the resource get opened in a new tab/window and sometimes it get opened as a pop-up (which should not be). Tried to capture any pattern but could not succeed.

    Any solution or even helping in understanding behavior would be really appreciated.

    Thanks & Regards,
    Test Developer.

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,295
    What do you think are pop up windows are?
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

  3. #3
    Join Date
    Nov 2013
    Posts
    3
    Hi \\.\,

    Thanks for replying. Popup windows are child windows which generally are opened with window.open syntax and don't have any menu and style bars. I don't have any such code but still sometimes links get opened as pop-ups.

    Thanks,
    Test.

  4. #4
    Join Date
    Nov 2013
    Posts
    3
    Is there anyone who have also encountered such issue(s)? Is there any clue?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles