10 Replies Latest reply on Feb 23, 2007 5:17 AM by Newsgroup_User

    javascript popups that open in same window causing focus problem

    spudnut Level 1
      I have been using javascript popups in actionscript buttons for some time with no issues. However, on a specific movie I have 2 button links, each of which opens a pdf file. I need each pdf to open using the same new window to avoid multiple new windows opening.

      This works fine on the first link I open - the new window appears on top of the main window. The second link, however, opens underneath the main window despite the focus() code. This only happens in IE - works fine in Firefox.

      Code used:

      link3_btn.onRelease = function() {
      getURL ("javascript:NewWindow=window.open('docs/first.pdf','newWin22','width=700,height=500,left =1 0,top=10,toolbar=No,location=No,scrollbars=Yes,sta tus=Yes,resizable=Yes');NewWindow.focus();void(0); ");

      link4_btn.onRelease = function() {
      getURL ("javascript:NewWindow=window.open('docs/second.pdf','newWin22','width=700,height=500,lef t= 10,top=10,toolbar=No,location=No,scrollbars=Yes,st atus=Yes,resizable=Yes');NewWindow.focus();void(0) ;");

      Any help would be appreciated. Thanks.