Invalid Argument with IE

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>
 
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>

I will show the call also:
onclick="openWindow('changes.asp?show=BlueBook#BlueBook','Errata
Changes','toolbar=no,menubar=no,location=no,status=no,scrollbars=no,resizable=no,width=300,height=100')"
 
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)

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;







</script>

I will show the call also:
onclick="openWindow('changes.asp?show=BlueBook#BlueBook','Errata
Changes','toolbar=no,menubar=no,location=no,status=no,scrollbars=no,resizab­le=no,width=300,height=100')"- Hide quoted text -

- Show quoted text -

I found the problem. IE didn't like having a space in the winName.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,244
Latest member
cryptotaxsoftware12

Latest Threads

Top