473,480 Members | 2,325 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Invalid Argument with IE

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>

Mar 22 '07 #1
2 10841
On Mar 22, 4:31 pm, "Steve" <S...@srpatterson.comwrote:
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#Blu eBook','Errata
Changes','toolbar=no,menubar=no,location=no,status =no,scrollbars=no,resizable=no,width=300,height=10 0')"

Mar 22 '07 #2
On Mar 22, 5:41 pm, "Steve" <S...@srpatterson.comwrote:
On Mar 22, 4:31 pm, "Steve" <S...@srpatterson.comwrote:


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#Blu eBook','Errata
Changes','toolbar=no,menubar=no,location=no,status =no,scrollbars=no,resizab*le=no,width=300,height=1 00')"- Hide quoted text -

- Show quoted text -
I found the problem. IE didn't like having a space in the winName.

Mar 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3356
by: Owen Jenkins | last post by:
Hello. For years I've been using the DBEngine.CompactDatabase code to make backups of backend databases. But now I've struck a baffling problem where I get an Invalid Argument error. This...
2
2404
by: Pradeep MM | last post by:
Hi Folks, I have a issue in Micosoft Jet 4.0 OLEDB. I am doing a repeated append of data into Microsoft Access 2002 (XP). For a few files I get the error as INVALID ARGUMENT. When I try to...
5
1716
by: Mariame | last post by:
Hi All, I have a datagrid in the select button i write the following code: Response.Write("<script>window.open('new.aspx', New Page',...
1
1391
by: llevi | last post by:
Hi there, My aspnet_state.exe service is failing to start due to an invalid argument. Does anyone know what arguments are required/valid for this service. I am running XP pro, .NET Framework v...
0
2006
by: Greg | last post by:
Hi, creating template1 database in /var/pgsql/data1/base/1... DEBUG: invoking IpcMemoryCreate(size=1081344) FATAL: shmat(id=1179648) failed: Invalid argument What's the problem why is shmat...
5
5432
by: Nuno Magalhaes | last post by:
I'm trying to set a multicast server but I get "Invalid argument" when setting multicast options. Below is the code that gives me problems more precisely in SetSocketOption with the AddMembership...
2
6569
by: veaux | last post by:
Peeked around here but didn't really see an explanation as to the varied "Invalid Argument" errors that appear in Access sometimes. I'm using Access 2003 and trying to import an Access table of...
4
3370
by: robert | last post by:
On a server the binary (red hat) installed python2.4 and also a fresh compiled python2.5 spits "sem_post: Invalid argument". What is this and how can this solved? Robert ============== ...
1
4623
by: max.aginaga | last post by:
Hi everyone I've come across the following problem: on two different linux machines, both running python 2.5 (r25:51908), I have the same file 'd.dat'. The md5 checksums are the same. Now, on...
4
6276
by: mattehz | last post by:
Hey there, I am trying to upload old source files and came across these errors: Warning: Invalid argument supplied for foreach() in /home/mattehz/public_html/acssr/trunk/inc_html.php on line 59...
0
7051
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7054
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
6993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4493
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3003
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2993
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1307
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.