Solved

Invalid argument error in javascript on Microsoft Internet Explorer

Posted on 2008-09-30
2
454 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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. …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

724 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