Solved

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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
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)
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

840 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