Solved

Invalid argument error in javascript on Microsoft Internet Explorer

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

Industry Leaders: 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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

737 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