Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE Bug with relative URLs #41

Open
untervolldampf opened this issue May 29, 2013 · 2 comments
Open

IE Bug with relative URLs #41

untervolldampf opened this issue May 29, 2013 · 2 comments

Comments

@untervolldampf
Copy link

In IE (9/10) baseURL is ignored, so when the option value is "page1/page2", and the current page is "http://example.com/page1/page3", IE tries to load "http://example.com/page1/page3/page1/page2"

Line 59 should be changed to reflect relative URls and IE9 behaviour, e.g.

var callURL = $(this).val();
if ($.browser.msie && callURL.indexOf("//") == -1 ) {
callURL = "/" + callURL;
}

Thx!

@KelvinC013
Copy link

Having same problem with IE10. Is this code "replacing" what's on line 59?
ie..replace this function..

// Change window location
$select.change(function () {
window.location.href = $(this).val();
});

Thanks

@untervolldampf
Copy link
Author

Yap, i replaced it with the following quick workaround which solved the problem for me:

    // Change window location
    $select.change(function () {            
      var callURL = $(this).val();
      if ($.browser.msie && callURL.indexOf("//") == -1 ) {
          callURL = "/" + callURL;
      }
      window.location.href = callURL; 
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants