Question

Failure to open links using window.open (applies to FF17 and FF18, works ok with FF16 and below)

Hello,

As mentioned, this only started happening with FF17, and repplicated with FF18. FF16 tested ok, and below.

This is the HTML code involved:

<a target="resource11" onclick="this.target='resource11'; return openpopup('/mod/resource/view.php?inpopup=true&amp;id=43','resource11','resizable=1,scrollbars=1,directories=1,location=1,menubar=1,toolbar=1,status=1,width=620,height=450');" href="http://myschool.education.loc/lms/mod/resource/view.php?id=43">

Notice the call to openpopup() function, which has this code:

function openpopup(url,name,options,fullscreen) {
  fullurl = "http://myschool.education.loc/lms" + url;
  windowobj = window.open(fullurl,name,options);
  if (fullscreen) {
     windowobj.moveTo(0,0);
     windowobj.resizeTo(screen.availWidth,screen.availHeight);
  }
  windowobj.focus();
  return false;
}

When clicking on the link on FF 17/18, I get this error and the popup does not open:

Error: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMJSWindow.open]

Seems like a bug?

Thanks

↓ Show more ↑ Show less
  • All posts
  • Helpful Solutions
  • post
  • helpful
  • helpful