perhaps javascript is not ready for xhtml 1.1 yet

While making a new layout for new millennium, I used a jquery plugin for a certain visual effect. I coded my source to be validated against Xhtml 1.1. If you validate your source recently, you’d notice that W3C now gives you a warning if your xhtml is not served with application/xhtml+xml mimeType. As perfectionist, I changed my mimeType to match but only to find a javascript bug now exists in my code. Reported by firebug, here’s the error message:

An invalid or illegal string was specified" code: "12

I pulled the latest jquery version but no luck. After a bit testing, it seems like it’s not an issue with the jquery lib but the plugin’s code. I posted on the author’s blog about the issue but after reading The Road to XHTML 2.0: MIME Types that was written almost 5 years ago, perhaps javascript is still not ready for application/xhtml+xml mimeType.

The fact that all the sudden it cares about case-sensitive is a big issue. Sounds like a lot of work to be done converting javascript to the new standards.

After thinking about it for a little, I chose to revert my doc type to Xhtml 1.0 Strict.


2 Comments Leave a Comment

Ivy [ Quote ]

Oooh! I can’t wait to see the new layout for NM! :)

February 18th, 2008 at 4:01 am
tobias [ Quote ]

Hi, I was searching the web for above problem that’s triggers from js; “An invalid or illegal string was specified” code: “12″ and found the solution. Its because ID-tags attributes used are only numeric, so change them to use a-z before eg. a123 or a_123. This problem suddenly occurred for me using latest browser versions, they probably have more strict xhtml policy.

September 12th, 2009 at 11:02 am

Leave a Comment Name, email and comment are required.
Email will never be displayed.

Leave a Comment
  1. :biggrin: :blank: :blush: :bored: :confused: :cool: :down: :evil: :frown: :grin: :grr: :laidback: :left: :mad: :right: :sad: :secret: :shock: :smile: :stress: :tongue: :up: :wink: :yawn: :cute: :dead: :film: :floppy: :glasses: :grumpy: :headphones: :heart: :lightbulb: :ouch: :tv: :upsidedown: :vodka: :yell: :yuck: :yummy: