More Questions Than Answers

Dan Atrill's blog site

JavaScript setting css float

Where object is myLHS = document.getElementById(“lhs”); trying to use object.style.float = ‘right’ wasn’t working. but using setAttribute does (at least it does in Firefox on a PC): myLHS.setAttribute(‘style’, ‘float: right’); There’s more on this here: Setting Float via JS – OZONE Asylum, home of the Mad Scientists See also the quirksmode entry on JavaScript – [...]

more... »

Tue, August 28 2007 » Web developing » No Comments

JavaScript time outs

Sometimes it’s necessary to repeat an action in JavaScript to check if something’s updated since last time the function was called: window.setInterval(“goAjax()”,1000); Sometimes things don’t immediately update in a browser so you may need to delay a function call using something like this: var bVal = setInterval(“buttonValid();”,500); and clearInterval(bVal); Functions/statements must be in quotes. Timings [...]

more... »

Thu, August 9 2007 » Web developing » No Comments

Search and replace

In very few lines it’s possible to search and replace text in MySQL: UPDATE table_name SET column_name = replace(column_name,”find_this”,”replace_with_this”) Thanks to Torkil Johnsen’s Search and replace in MySQL article

more... »

Wed, August 8 2007 » MySQL » No Comments