Side navigation
#6239 closed bug ()
Opened March 07, 2010 09:29PM UTC
Closed November 11, 2010 11:09PM UTC
Last modified September 26, 2011 01:20PM UTC
Error on tag selection
Reported by: | Dark-Ape | Owned by: | Dark-Ape |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.3 |
Component: | selector | Version: | 1.4.2 |
Keywords: | custom tag, selector | Cc: | |
Blocked by: | Blocking: |
Description
I wrote a script for custom tags to be replaced with externally generated content and it works fine in everything by IE. When debugging the problem, both IE7 & IE8 say the error is occuring in the jQuery JS file, not the code. I originally wrote this for 1.3.2, but the same thing is occuring when using 1.4.2. I've attached the code I am using to this ticket.
Attachments (1)
Change History (12)
Changed May 26, 2010 05:57PM UTC by comment:1
Changed October 15, 2010 02:11AM UTC by comment:2
owner: | → Dark-Ape |
---|---|
priority: | → undecided |
status: | new → pending |
Was your code able to run fine using 1.3.2 or is is broken across all versions of jQuery?
Changed October 15, 2010 03:42PM UTC by comment:3
jsFiddle: http://jsfiddle.net/aUF3z/1/
The result in jsFiddle's result isn't the completed version, since I failed to find an external file reference in the API, but IE does not even replace the tags with the loading image that appears in jsFiddle.
I have run this code using both 1.3.2 and 1.4.2 and neither version works in IE8, yet work fine in both jQuery versions for Firefox and Chrome. I no longer have a version of IE7 to work with, but the compatibility viewer says it is still broken.
jQuery 1.4.2 "Webpage error details" from IE:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C)
Timestamp: Fri, 15 Oct 2010 15:39:00 UTC
Message: Unexpected call to method or property access.
Line: 103
Char: 460
Code: 0
URI: http://www.hacres.com/js/jquery-1.4.2.min.js
jQuery 1.3.2 "Webpage error details" from IE:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C)
Timestamp: Fri, 15 Oct 2010 15:40:07 UTC
Message: Unexpected call to method or property access.
Line: 12
Char: 2305
Code: 0
URI: http://www.hacres.com/js/jquery-1.3.2.min.js
Replying to [comment:2 addyosmani]:
Was your code able to run fine using 1.3.2 or is is broken across all versions of jQuery?
Changed November 11, 2010 11:09PM UTC by comment:4
status: | pending → closed |
---|
Automatically closed due to 14 days of inactivity.
Changed November 11, 2010 11:45PM UTC by comment:5
_comment0: | Why was this closed?! → 1289519218054288 |
---|
Why was this closed? I realize that I forgot to login to post my response (after already posting it), but still unsure as why this was closed when still unresolved.
Changed November 12, 2010 12:02AM UTC by comment:6
It was closed due to inactivity. There's no real evidence there is a jQuery bug in play here, rather something that this custom tags script is doing improperly. If you are indeed creating custom elements on the fly, jQuery does not support this behaviour out of the box, even if it does kinda-sorta work in non-IE browsers.
If you can actually provide a simple test that shows what the plugin is doing, not the code you're using to invoke the plugin, we can maybe take a look.
Changed November 12, 2010 12:15AM UTC by comment:7
_comment0: | The call for the event listing for God's Way to Ultimate Health on http://www.hacres.com/education/on-the-road: \ <jtag limit="10" key="128" type="onTheRoad"></jtag> \ \ I'm using the custom "jtag" tag as an easy selector... \ \ 1. We're updated all of those tags with actual HTML in case the load fails. \ 2. {rocessing each jtag one at a time, we're post-pending every attribute with content on that tag to the .load's url. \ 3. The .load's page is using those attributes to grab database entries and return formated HTML. \ 4. On success, replace the jtag entirely with the .load's response. → 1289520974285817 |
---|---|
_comment1: | The call for the event listing for God's Way to Ultimate Health on http://www.hacres.com/education/on-the-road: \ <jtag limit="10" key="128" type="onTheRoad"></jtag> \ \ I'm using the custom "jtag" tag as an easy selector... \ \ 1. We're updated all of those tags with actual HTML in case the load fails. \ 2. Processing each jtag one at a time, we're post-pending every attribute with content on that tag to the .load's url. \ 3. The .load's page is using those attributes to grab database entries and return formated HTML. \ 4. On success, replace the jtag entirely with the .load's response. → 1289521005574908 |
The call for the event listing for God's Way to Ultimate Health on http://www.hacres.com/education/on-the-road:
<jtag limit="10" key="128" type="onTheRoad"></jtag>
I'm using the custom "jtag" tag as an easy selector...
1. We're updated all of those tags with actual HTML in case the load fails.
2. Processing each jtag one at a time, we're post-pending every attribute with content on that tag to the .load's url.
3. The .load's page is using those attributes to grab database entries and return formated HTML.
4. On success, replace the jtag entirely with the .load's response.
Changed November 12, 2010 12:35AM UTC by comment:8
_comment0: | Non-standard elements cannot be created on the fly using JavaScript in IE unless they are "shived" using a technique like http://jdbartlett.github.com/innershiv/ or https://gist.github.com/5ebafd3bad9f131fe95b. This technique, for instance, is used for allowing HTML5 elements to work in IE. \ \ This is not a jQuery bug, but rather a question of support. Will jQuery support auto-shiving nonexistent elements? Seeing as its something of a corner case, probably not, more the job for a plugin. Therefore, this ticket is probably going to remain closed.... to clarify though, has this plugin *ever* worked in IE? → 1289522254730744 |
---|
Non-standard elements cannot be created on the fly using JavaScript in IE unless they are "shived" using a technique like http://jdbartlett.github.com/innershiv/ or https://gist.github.com/5ebafd3bad9f131fe95b. This technique, for instance, is used for allowing HTML5 elements to work in IE.
This is not a jQuery bug, but rather a question of support. Will jQuery support auto-shiving nonexistent elements? Seeing as it's something of a corner case, probably not, more the job for a plugin. Therefore, this ticket is probably going to remain closed.... to clarify though, has this plugin *ever* worked in IE?
Changed November 12, 2010 01:41PM UTC by comment:9
Not to my knowledge; I only wrote it when 1.3.2 was already out.
Changed November 12, 2010 02:45PM UTC by comment:10
In that case it is definitely not a jQuery bug, but rather a design flaw. What you're trying to do cannot be done in IE without resorting to expensive hacks that we cannot afford to integrate into jQuery Core. Sorry for any confusion, thanks for your time.
Changed December 28, 2010 01:23AM UTC by comment:11
In case someone else stumbles upon this thread via Google... I had the exact same error and finally found that the offending line was trying to set the title using:
$('title').text("some title");
I changed the method (and added a bit more safety) and have no more problems with:
try{
document.title = "some title";
}
catch(err) {
}
Changed September 26, 2011 01:20PM UTC by comment:12
Yep, IE just didn't like trying to select an unknown tag, so I just changed all of my jTag tags into divs that had the class of jTag, updated the selector and then it worked.
Has anyone found a viable solution or even been able to track how/why this error occurs? I have been looking myself without success. ><