• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 463
  • Last Modified:

Invalid argument error in javascript on Microsoft Internet Explorer

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
onaled777
Asked:
onaled777
1 Solution
 
LordOfPortsCommented:
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
 
onaled777Author Commented:
It worked!  Thank you soooo much.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now