Solved

Invalid argument error in javascript on Microsoft Internet Explorer

Posted on 2008-09-30
2
452 Views
Last Modified: 2012-06-27
When I try to defined the double Click action for a select object I make a call to a javascript function which throws an error in IE but not firefox.

Here is the call:

      <select
            name="selOffers" id="selOffers"
            size="30" class="OptsFormData" style="width: 400px;"
            onDblClick="handleClick(this.value, -1)"       
      >

The actual javascript function is attached in the code snippet.

Can anyone let me know how this can be corrected.





<script type="text/javascript">
		function handleClick(OffID, SeqID){
			if (SeqID != -1){
				window.open('CreativeGroups_POPUP.cfm?oid='+OffID+'&sid='+ SeqID, 'Creative Groups', 'height=200,width=200,top=350,left=350,resizable');
			}else{
				window.open('CreativeGroups_POPUP.cfm?oid='+OffID, 'Creative Groups', 'height=200,width=200,top=350,left=350,resizable');
			}
			
		}
	</script>

Open in new window

0
Comment
Question by:onaled777
2 Comments
 
LVL 19

Accepted Solution

by:
LordOfPorts earned 500 total points
ID: 22609724
Try removing the spaces in the titles of the windows you are opening. In the code snippet below I replaced the spaces in the name 'Creative_Groups' with an underscore.
<script type="text/javascript">
		function handleClick(OffID, SeqID){
			if (SeqID != -1){
				window.open('CreativeGroups_POPUP.cfm?oid='+OffID+'&sid='+ SeqID, 'Creative_Groups', 'height=200,width=200,top=350,left=350,resizable');
			}else{
				window.open('CreativeGroups_POPUP.cfm?oid='+OffID, 'Creative_Groups', 'height=200,width=200,top=350,left=350,resizable');
			}
			
		}
</script>
 
<select 
            name="selOffers" id="selOffers" 
            size="30" class="OptsFormData" style="width: 400px;" 
            onDblClick="handleClick(this.value, 1)"       
      ><option value="1">1</option></select>

Open in new window

0
 

Author Comment

by:onaled777
ID: 22610728
It worked!  Thank you soooo much.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Review of the nodejs code 1 36
How to calculate height of a text using jquery 3 42
Jquery if else not working ... WHY? 5 24
Put POST values into cookies. 14 34
This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question