Side navigation
#6437 closed bug (invalid)
Opened April 14, 2010 06:25PM UTC
Closed November 22, 2010 06:00AM UTC
Last modified March 13, 2012 08:48PM UTC
AJAX IE error "Object doesn't support this property or method"
Reported by: | twenzel | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | |
Component: | ajax | Version: | 1.4.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
It's a weird bug. The most time I call a ajax method I recieve following error "Object doesn't support this property or method".
jquery.js
Line 4954
Char 5
After a page refresh sometime it works sometime it doesnt.
I've attached a screenshort of the ie8 script debugger. The code works fine on FF and Chrome.
Do you have any suggestions?
Attachments (6)
Change History (14)
Changed April 15, 2010 12:08AM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
Changed April 17, 2010 10:05AM UTC by comment:2
resolution: | invalid |
---|---|
status: | closed → reopened |
Here are the steps to reproduce the problem:
- open IE8
- enter follwing url: http://rpv2.test.exsportance.de/en/Index/Index/test
- type "test" in username and password field
- hit login
- the error occurs on line 4954 in jquery.cs
Changed April 26, 2010 09:40PM UTC by comment:3
2010-04-26 . I have the same problem with MSIE (6.0.2900.5512.xpsp.080413-2111 [sp3]) with jQuery 1.4.2. I
Added some code before the fatal "$.ajax() call:
... if (typeof($.ajax)!=='undefined') {
... alert("F1b_root.js(88): L'objet '$.ajax' EST DÉFINI. (Type: "+typeof($.ajax)+").");
...
and the text "...(Type: function)." appears in the alert window before the "property or method..." message displayed by IE(Sorry, the real message is in spanish!). Under Windows, no problem with firefox 3.6.3. Dont normaly use MSW/MSIE, so I checked/tryed the security settings, but nothing fund. Using Windows for test purpose only.
Changed April 28, 2010 06:03PM UTC by comment:4
After a look on the way to turn around, it works fine. So, some buggy condition(s) found by IE in the code previously executed could place it silently in a state it can display this "Object doesn't support this property or method" message. Then: the solution for the user is to check his code until this display disapears... and good luck!
Patrick
Changed April 28, 2010 06:48PM UTC by comment:5
The problem was probably coming from an attempt to share the main page jQuery code from an IFRAME (all using the same domain anyway)... Everything was working well (with shared jQuery) until the insertion of the ajax call in the iframe page code. This could help users (and jQuery developpers ?)... I hope that this is the final post in that thread :-)
Changed May 06, 2010 03:34PM UTC by comment:6
Back... By my side, the status of this ticket should be changed. My problem was:
Opera said:
Error: \\
name: TypeError \\
message: Statement on line 447: Type mismatch (usually non-object value supplied where object required)
Window IE said:
line: 496 \\
car: 4 \\
error: this object does not accept...(in spanish) \\
The faulty line(s) in source file were: line 447 (or 496)=« $.get("F0ax.php", », following line: « { AxIn: "ints:"+lang+":"+Fi_0.phpQ.ReqText.toSource() }, » then « function(msg) { »
The advanced developpers should immediatly see (if I was able to format this post properly) that the problem was not line 448 nor line 497, column 4. I needed days to find it :-/.
But why does M$ give a character number in the faulty line if this information is not reliable??? Both browser saying that the faulty line was the previous one. Note that I thougt to this possibility, and that's why the instruction is on more than one line!
I take the risk to appear ridiculous, but this last post could help other newbies.
Please, excuse me (and Microsoft)...
Changed May 08, 2010 10:49AM UTC by comment:7
I solved my problem. It's a weired IE bug. I'v created a IE issue:
https://connect.microsoft.com/IE/feedback/details/553766
Short description:
A ajax call fails when the html page is declared as UTF-8 (<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />)
and no HTTP charset header ('Content-type: text/html; charset=utf-8') is provided.
Changed October 01, 2010 02:20AM UTC by comment:9
priority: | → undecided |
---|---|
resolution: | → invalid |
status: | reopened → closed |
Having reviewed the discussion on this particular ticket, it would appear that it has been confirmed as a bug in IE8.0, but not the jQuery core.
Further evaluation of the existence of this bug is not possible at this time as neither the Microsoft feedback link provided is valid any longer nor is the username/password on the site provided as a demonstration.
Closing.
Changed October 27, 2010 04:01PM UTC by comment:10
This is still happening for me and it seems quite a lot of others too. I'm using IE8.
The HTML document needs a XHTML doctype in order to reproduce this bug. My document also has a utf-8 charset defined in a meta tag and i do NOT have a http charset header being sent (sending it doesn't fix the problem). The problem is present in 1.4.2 and 1.4.3 (i just tested the lattrr today).
The following code, lifted from here: http://www.sikosoft.com/item/jquery_object_doesnt_support_this_property_or_method_142_-_solution
"fixes" the problem:
$(function () {
$.ajaxSetup({
xhr: function() {
if ($.browser.msie) {
return new ActiveXObject("Microsoft.XMLHTTP");
} else {
return new XMLHttpRequest();
}
}
})
})
Changed October 27, 2010 04:02PM UTC by comment:11
ergghh... here's the "fix" properly formatted:
$(function () { $.ajaxSetup({ xhr: function() { if ($.browser.msie) { return new ActiveXObject("Microsoft.XMLHTTP"); } else { return new XMLHttpRequest(); } } }) })
Changed October 27, 2010 07:04PM UTC by comment:12
milestone: | 1.4.3 |
---|---|
resolution: | invalid |
status: | closed → reopened |
version: | 1.4.2 → 1.4.3 |
In light of the new information that daflip posted can we reevaluate this problem?
Changed October 28, 2010 09:43PM UTC by comment:13
I'm getting the same error at a different location, line 100 character 300 in the 1.4.3 minimized version.
Adding the above ajaxSetup hack does nothing but reverting to 1.4.2 makes the error go away.
Changed November 22, 2010 06:00AM UTC by comment:14
_comment0: | We need a reproducible, reduced test case in order to evaluate this issue. So far, after 7 months, we do not have one. → 1290406270221905 |
---|---|
_comment1: | We need a reproducible, reduced test case in order to evaluate this issue. So far, after 7 months, we do not have one. If anyone can provide one (using [http://jsfiddle.net jsFiddle]), then we can reopen and reevaluate this issue. → 1290406281583469 |
resolution: | → invalid |
status: | reopened → closed |
We need a reproducible, reduced test case in order to evaluate this issue. So far, after 7 months, we do not have one. If anyone can actually provide one (using jsFiddle), then we can reopen and reevaluate this issue.
Screen shots don't make it easy to reproduce the problem. Since it's not clear this is a jQuery bug, can you start on the forums?
http://forum.jquery.com