Solved

JQuery error in IE 6 only: "object doesn't support this property or method"

Posted on 2010-09-03
5
942 Views
Last Modified: 2013-12-08
hi all,

I'm experiencing a weird error in IE 6 only.

I have an online form that utilizes jquery validate and jquery datepicker.

The page loads fine but when Jquery is parsed i get the following error:

"Object doesn't support this property or method"

my script is below allong with the includes. hopefully someone can shed some light on this.


<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.pack.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/date.js"></script>
<!--[if IE]><script type="text/javascript" src="/js/jquery.bgiframe.js"></script><![endif]-->
<script type="text/javascript" src="/js/date_picker.js"></script>

<link href="/css/form.css" rel="stylesheet" type="text/css" />


<?php include("../includes/header.php"); ?>

	
<script type="text/javascript">
$(function(){
	$("#contactform").validate();

	$(".date-pick").datePicker().val(new Date().asString()).trigger("change");
	

	$("#com_ind").click(function(){
		
		if($(this).val()==="Other"){
			$("#other_ind").show();
		}
			
		else{
			$("#other_ind").hide();
		}
		
	});
	
	$("#enq_area_interest").click(function(){
		
		if($(this).val()==="Other"){
			$("#other_int").show();
		}
			
		else{
			$("#other_int").hide();
		}
		
	});

	
});
</script>

Open in new window

0
Comment
Question by:CurtinProp
[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
5 Comments
 

Expert Comment

by:gayan007
ID: 33594446
Please go to <a href="http://api.jquery.com/">JQury API</a> site and check whether you are doing something wrong.
0
 
LVL 8

Expert Comment

by:albacom
ID: 33594451
Can you please include the full path of your code files like the following:

<script type="text/javascript" src="http://www.yoursite.com/js/date_picker.js"></script>
<?php include("http://www.yoursite.com/includes/header.php"); ?>

or send a full url of this page if possible.

This will make it easier for us to debug.

Regards

0
 
LVL 8

Accepted Solution

by:
albacom earned 500 total points
ID: 33594459
For instance what I can notice is the following line of code which will be used from IE:

<!--[if IE]><script type="text/javascript" src="/js/jquery.bgiframe.js"></script><![endif]-->

IE will use this file instead /js/jquery.bgiframe.js
0
 
LVL 2

Expert Comment

by:amischol
ID: 33599570
$(".date-pick").datePicker().val
this method is not for Datepicker
0
 
LVL 2

Author Closing Comment

by:CurtinProp
ID: 33608714
turns out the issue was connected to the IE include....

Thanks for the help.
0

Featured Post

PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
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…

631 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