Friday, March 5, 2010

HTML stuff...

Never put a block-level element inside a paragraph :


! This is illegal in HTML 4.01 (

"The P element represents a paragraph. It cannot contain block-level elements (including P itself)."


IE8 - JSON works, but only if you have:

otherwise IE8's JSON object is undefined...


IE8 - eval function - Accepts string only, and should be enclosed in parenthesis! So if you are eval'ing an object then the object name is put in quotes. For example:

parse(jsonString) {
return eval('(' + jsonString + ')');
//return eval(jsonString); -- Illegal!


PHP - isset should be used to see if variable exists, also variable indexes and the like.
ie: isset(myObj['testExist'])); will return true if testExist exists and is non-null


Chrome and Safari (guessing it's a webkit issue) won't keep the text selected if you just use an onFocus callback with a call. You must cancel the mouseup event otherwise the text most of the time gets deselected. Argh

No comments:

Post a Comment