quirks

Will adding rel or name attributes to divs and spans cause IE/FF to go into quirks mode?

Will a tag like <span id="suchAndSuch" class="blah" rel="this.that.other" name="this.name"></span> or <div id="suchAndSuch" class="blah" rel="this.that.other" name="this.name"></div> throw IE and/or FF to QM? According to W3C, those aren't standard attributes for those tags, but it does not say if it'll make them invalid. Your hel...

How do you cleanly separate code for backwards compatibility from the main code?

I'm interested in what strategies people have come up with for separating all the crufty logic that's necessary to maintain backwards compatibility from the main code of an application. In other words, strategies that let you come closer to having your code look as if there were no backwards compatibility concerns except for separate iso...

Why is Html.DropDownList() producing <select name="original_name.name"> instead of just <select name="name">?

I have an editor template whose job is to take a SelectList as its model and build a select element in html using the Html.DropDownList() helper extension. I'm trying to assign the name attribute for the select based on a ModelMetadata property. (Reason: on post-back, I need to bind to an object that has a different property name for th...

Is there any benefit to my rather quirky character sizing convention?

I love things that are a power of 2. I celebrated my 32nd birthday knowing it was the last time in 32 years I'd be able to claim that my age was a power of 2. I'm obsessed. It's like being some Z-list Batman villain, except without the colourful adventures and a face full of batarangs. I ensure that all my enum values are powers of 2...

Parsing of badly formated HTML in PHP

In my code I convert some styled xls document to html using openoffice. I then parse the tables using xml_parser_create. The problem is that openoffice creates oldschool html with unclosed <BR> and <HR> tags, it doesn't create doctypes and don't quote attributes <TABLE WIDTH=4>. The php parsers I know off don't like this, and yield xml ...

Adding a class to an element in quirksmode

I try to add a class to a td-element using javascript with the internet explorer 8 in quirks-mode. That seems to work, because I can see the added class when I view the source, but my css doens't affect it so nothing visually changes at all. I simply add a html class to change the background-color but nothing happens. It works when runni...

Force Quirks mode with Doctype

I have a page which needs to be rendered in Quirks mode for the page to be loaded properly. The problem is that the page uses valid XHTML and thus has a doctype. This forces the page to render in Standards mode in all browsers. Is there any workaround/hack that can force Quirks mode eventhough I have a doctype? ...

JQuery class selectors like $(.someClass) are case sensitive?

Given this HTML: <div class="OpenIDSelector">some text</div> Why does this JQuery selector match it on some browsers and some pages, but not on others? $('.OpenIdSelector) NOTE: I ran into this problem and solved it myself, but it was annoying and I didn't find it on StackOverflow already, so I'm posting it as a Q&A pair so someon...

PHP readfile adds content length to output

I am using the PHP readfile function to read a file and print it like so: print readfile ('anyfile'). This works, but the content length of the file is added at the end of the string also. Why? ...

YUI Modal Dialog in IE7 Quirks Mode

I have a page in Quirks mode (no DOCTYPE). I'm trying to show a YUI modal dialog. And it shows correctly under Chrome & FF. But in IE7, when the dialog pops up, the font size of all the other elements on page becomes smaller. And it remains like that, even after I dismiss the dialog. This isn't a problem for IE7 in Standards mode. But i...

jQuery's draggable grid

It looks like that the 'grid' option in the constructor of Draggable is relatively bound to the original coordinates of the element being dragged - so simply put, if you have three draggable divs with their top set respectively to 100, 200, 254 pixels relative to their parent: <div class="parent-div" style="position: relative;"> <di...

Reason behind a JavaScript parsing error in MSIE 8

Given something like var obj = { foo: function(){ try{ doSomething(); }catch(ex){ //@TODO - report error } } } MSIE 8 would throw up a "Missing semi-colon on line #" which was where the @TODO was. After I sed'd the dozens of @TODO's to be !TODO, MSIE was able to prop...

with xhtml documnent , how do one trigger quirk mode?

With the Xhtml document , how do you trigger quirk mode in internet explorer? is it related to meta tag or doc type? ...

IE Standards modes

Hi I just have a quick question about IE8 Standards mode vs Quirks mode. The page displays fine if you load its first page then log in. I have searched for the doc type which i think is right for changing the page to IE8 Standards Mode and i think it works because IE's built in debugger says it's in that mode. Also if you start on anot...

Problem with IE Quirks Mode - Div with fixed height expanding

I'm having a weird problem with IE8. Page DOCTYPE is QuirksMode and I CANNOT change it (I wish I could, but there's no way at this time). Widths are hacked to fix the difference of box modem interpretation between IE and other browsers. It's a simple horizontal navigation bar. It has a border all along, and the selected item should be a ...

Weird IE6/IE layout bug

Hi, I've had quite a few problems with IE6 and our website. http://www.sweetlets.com/w/solutions/click-stream/features/ At the very top the teaser boxes have scrollbars in IE6, but not IE7, IE8, FF or Chrome. Does anyone have an explanation for this? Same effect in the footer with the 3 boxes in one row. Also scrollbars. Mathematica...

Javascript Math Error: Inexact Floats

Possible Duplicates: Is JavaScripts Math broken? How is floating point stored? When does it matter? Code: var tax= 14900*(0.108); alert(tax); The above gives an answer of 1609.2 var tax1= 14900*(10.8/100); alert(tax1); The above gives an answer of 1609.200000000003 why? i guess i can round up the values, but why is t...

What is Quirks mode in IE8 Developer toolbar?

Hi guys, I am wondering what is Quirks mode in IE8 Developer toolbar? Why page rendering is different in Quirks mode than in IE8 standard mode? ...

Avoiding messy browser's death

During the past few months, I've been working on a large web application. Repeatedly, we've written code that, according to DOM & JS specifications, should work perfectly, but still manages to completely kill one or more of our test browsers -- recently, we produced pure JavaScript code that should have been harmless but causes General P...