Solved

Invalid argument error in javascript on Microsoft Internet Explorer

Posted on 2008-09-30
2
450 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Capture logon name 13 74
Google Maps API and PHP 25 34
Optimize simple Javascript code to use no repetitions 12 32
How to check if a session is disconnected in php 9 12
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

821 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