# 2 javascript popups - focus issue with pdf in IE6

**URL:** <https://forum.kirupa.com/t/2-javascript-popups-focus-issue-with-pdf-in-ie6/217075>\
**Category:** flash\
**Created:** [February 22, 2007, 7:53pm UTC](https://forum.kirupa.com/t/2-javascript-popups-focus-issue-with-pdf-in-ie6/217075 "2007-02-22T19:53:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![designer](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@designer](https://forum.kirupa.com/u/designer)\
**Post date:** [February 22, 2007, 7:53pm UTC](https://forum.kirupa.com/t/2-javascript-popups-focus-issue-with-pdf-in-ie6/217075/1 "2007-02-22T19:53:53Z")

</div>

Hi all,

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=10,top=10,toolbar=No,location=No,scrollbars=Yes,status=Yes,resizable=Yes’);NewWindow.focus();void(0);”);  
}

link4\_btn.onRelease = function() {  
getURL (“javascript:NewWindow=window.open(‘docs/second.pdf’,‘newWin22’,‘width=700,height=500,left=10,top=10,toolbar=No,location=No,scrollbars=Yes,status=Yes,resizable=Yes’);NewWindow.focus();void(0);”);  
}

Any help would be appreciated. Thanks.
