Solved

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

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
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…

770 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