Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-09-03
5
Medium Priority
?
949 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 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
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…

670 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