Solved

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

Posted on 2010-09-03
5
927 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
5 Comments
 

Expert Comment

by:gayan007
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
$(".date-pick").datePicker().val
this method is not for Datepicker
0
 
LVL 2

Author Closing Comment

by:CurtinProp
Comment Utility
turns out the issue was connected to the IE include....

Thanks for the help.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Several part series to implement Internet Explorer 11 Enterprise Mode
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now