S
Steve
I wrote this function to open a pop-up window and it works great on
every browser except IE.
IE gives an 'Invalid Argument' error on this line: var w =
window.open(theURL,winName,features);
<script language="JavaScript">
function openWindow(theURL,winName,features)
{
try
{
if
(document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_tax.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_mhc.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_edu.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_bor.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_sen.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_das.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_eth.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_dys.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== '')
{
var w =
window.open(theURL,winName,features);
var posX =
(screen.availWidth - 800) / 2;
var posY =
(screen.availHeight - 600) / 2;
w.moveTo(posX,posY)
}
}
catch(err)
{
}
}
</script>
every browser except IE.
IE gives an 'Invalid Argument' error on this line: var w =
window.open(theURL,winName,features);
<script language="JavaScript">
function openWindow(theURL,winName,features)
{
try
{
if
(document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_tax.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_mhc.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_edu.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_bor.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_sen.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_das.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_eth.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== 'e_dys.pdf' ||
document.SectionE.list.options[document.SectionE.list.selectedIndex].value
== '')
{
var w =
window.open(theURL,winName,features);
var posX =
(screen.availWidth - 800) / 2;
var posY =
(screen.availHeight - 600) / 2;
w.moveTo(posX,posY)
}
}
catch(err)
{
}
}
</script>