nicholaspaul
04-18-2006, 03:42 AM
I have a script that opens a new windows, but I'm having trouble with it opening in Firefox, so I want to force it to open in Internet Explorer. Incidentally, this is for an interactive CD that has two sides, Mac and Windows, but it's the Windows version I'm having trouble with.
In my research I have decided that most (if not all) users will have IE still installed so forcing a page to open in IE (whether it is the default browser or not) shouldn't be an issue.
The code I have at the moment is as follows:<script language="javascript" type="text/javascript">
<!--
var browserName=navigator.appName;
if (browserName=="Microsoft Internet Explorer")
{
window.open("data/ie/index.html","nbd","left=100, top=100,width=850,height=650,resizable,scrollbars=yes,status=0");
}
else
{
window.open("data/mozilla/index.html","nbd","left=100, top=100,width=850,height=650,resizable,scrollbars=yes,status=0");
}
//-->
</SCRIPT>
Bascially, it is detecting the browser and opening the corresponding page on the CD. I have two different versions, each with different style sheets, incase you were wondering why there would be two different index.html pages, but for this post that is really irrelevant.
My main concern at this point is to find a way to force the new page to open in Internet Explorer only.
In my research I have decided that most (if not all) users will have IE still installed so forcing a page to open in IE (whether it is the default browser or not) shouldn't be an issue.
The code I have at the moment is as follows:<script language="javascript" type="text/javascript">
<!--
var browserName=navigator.appName;
if (browserName=="Microsoft Internet Explorer")
{
window.open("data/ie/index.html","nbd","left=100, top=100,width=850,height=650,resizable,scrollbars=yes,status=0");
}
else
{
window.open("data/mozilla/index.html","nbd","left=100, top=100,width=850,height=650,resizable,scrollbars=yes,status=0");
}
//-->
</SCRIPT>
Bascially, it is detecting the browser and opening the corresponding page on the CD. I have two different versions, each with different style sheets, incase you were wondering why there would be two different index.html pages, but for this post that is really irrelevant.
My main concern at this point is to find a way to force the new page to open in Internet Explorer only.