Jquery - IE not implemented error (in IE 8) - javascript

I am having an IE not implemented JavaScript error and it seems not to have anything to do with what ive been reading on so far on this website.
Im using jquery.simplemodal plugin which works fine in all browsers except IE unless I change the doctype to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
IE is pointing the error to the first line of the following code (I mean the line in bold):
s.removeExpression('height');
s.removeExpression('width');
s.setExpression('height',''+bsh+' > '+bch+' ? '+bsh+' : '+bch+' + "px"');
s.setExpression('width',''+bsw+' > '+bcw+' ? '+bsw+' : '+bcw+' + "px"');
How can I make it work in IE while using a doctype different from
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
(I would like to use this doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">)
The plugin is available at http://lescracks.com/jquery.simplemodal.js . IE detects the error at line 142.
Thanks
One more thing, it also works fine in IE with the Compatibility view enabled.

.setExpression() and .removeExpression() are non-standard methods. In IE8 Microsoft removed support for them in standards mode (which the XHTML doctype triggers) because they were trying to make their browser more standards-compliant.
There's an issue in simplemodal's issue bug tracker discussing this. Apparently it has been fixed in version 1.4.1, but you're using 1.2.2. They must have stopped relying on these methods; you'll have to upgrade.

Related

Internet Explorer browser 9 and meta tag 10 or higher? What happens?

I have 3 situations I like to understand, but don't know the how to confirm or to test and analyse :(
In all case we use Internet Explorer Browser 9 application.
Situation 1:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="X-UA-Compatible" content="IE=10" />
As you above see the HTML pages is set meta tag is set to content=10, but we use IE9 browser. What will happens? which metag is used? What if I set content=IE11 or contentXSSDDS in meta tag? So what's the fallback?
Situation 2:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="X-UA-Compatible" content="IE=8" />
Here we use content=IE8, so does it mean IE9 features mentioned in http://msdn.microsoft.com/en-us/library/ie/dn467846%28v=vs.85%29.aspx#changes_introduced_for__ie11 are not used? I need to look a the IE8 features right?
Situation 3:
If we use IE9 or IE10 browser and we set the doctype type <!doctype html> what doctype is then used in the HTML page? I mean what engine is it used. Will it use HTML 5?
Does your content type also decide whether you can use new HTML 5 (elements or not) like etc.
correction after Jukka's right remark:
Situation 1: Browser IE9 is used and in HTM pages meta tag: content="IE8" for 1 application
Situation 2: Browser IE9 is used and in HTML pages meta tag: content="IE10" for another application
What will it do in situation 1: Will it use IE8 engine (features) and in situation 2...
For me it's not clear a browser version 9 is installed and you use content IE=10...??

jquery simplemodal error on IE8 for removeExpression [duplicate]

I am having an IE not implemented JavaScript error and it seems not to have anything to do with what ive been reading on so far on this website.
Im using jquery.simplemodal plugin which works fine in all browsers except IE unless I change the doctype to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
IE is pointing the error to the first line of the following code (I mean the line in bold):
s.removeExpression('height');
s.removeExpression('width');
s.setExpression('height',''+bsh+' > '+bch+' ? '+bsh+' : '+bch+' + "px"');
s.setExpression('width',''+bsw+' > '+bcw+' ? '+bsw+' : '+bcw+' + "px"');
How can I make it work in IE while using a doctype different from
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
(I would like to use this doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">)
The plugin is available at http://lescracks.com/jquery.simplemodal.js . IE detects the error at line 142.
Thanks
One more thing, it also works fine in IE with the Compatibility view enabled.
.setExpression() and .removeExpression() are non-standard methods. In IE8 Microsoft removed support for them in standards mode (which the XHTML doctype triggers) because they were trying to make their browser more standards-compliant.
There's an issue in simplemodal's issue bug tracker discussing this. Apparently it has been fixed in version 1.4.1, but you're using 1.2.2. They must have stopped relying on these methods; you'll have to upgrade.

Floating DIV in quirks mode

Im working with a very badly coded CMS which only works in Quirks Mode and I want to place a floating div at the right bottom of the page. I've spent the last 2 hours searching for a possible way to do this. Normally I would just: Position:fixed; but this won't work in Quirks Mode.
Is it possible to do with javascript?
If, then how?
Have you tried to change the DOCTYPE? How to get "position:fixed" css to work in IE 7+ with TRANSITIONAL doctype?
And using HTML5 doctype?
<!DOCTYPE html>
Have you tried an absolute position instead? Having the div as a child of the body tag.
Quirks mode in IE 7 can also be triggered when coding HTML 4.01 documents. Inserting a comment before the DTD will trigger this backwards compatible mode in both IE 6 and IE 7.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
or
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and It isn't always obvious which rendering mode a browser is in. In IE address line, type in
javascript:alert(document.compatMode)
Thanks,
Brendon

Slimbox centering on whole page, not the window

I was trying to integrate Slimbox into my web page, but couldn't get it to work properly. For some reason, the popup is centered on the whole page, not just its visible part. Here's an example of the situation: here.
I tested it in Firefox and Chrome on Linux and Slimboxes on other web pages look fine. Any idea how to get it working?
Also remember about <!DOCTYPE html> in HTML5 documents.
In my case, this turned out to be important in Slimbox 2.05!
So I change the doctype from HTML 4.0 Transitional to XHTML 1.0 Transitional and it works like magic. Does anybody know why? There's something about having a XHTML doctype in Slimbox 1 readme, but they don't mention it in the readme to version 2.

jQuery Flexigrid Resize columns in IE7 broken

In firefox, column resizing works fine. But in ie7, it's broken.
Here's a thread about flexigrid broken from jquery 1.3, I've tried the suggested edits to the flexigrid code, didnt work.
We're currently using jquery 1.3, although i've tried 1.3.1 & 1.3.2, neither fixed the problem.
While inspecting the css in ie7, I noticed <div class="cDrag"> (the div that contains the styles for dragging columns) was way to the right of my grid.
Has anyone experienced anything similar?
IE7 requires the following at the top of the page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Categories