Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Tuesday, August 31, 2010

javascript debugging

Im Firefox gibts das Plugin Firebug, und dann kann man mit
console.log("my trace"); im consolen Fenster logs erzeugen - internet explorer 8 bricht das javascript ab wenn copnsole.log erscheint

Thursday, July 29, 2010

javascrip: suchen nach Id

GetElementById funktioniert auf manchen objekten nciht, und wenn man relativ suchen möchte bleibt einem nur jquery oder:

function FindChild(par, childid) {
for (i = 0; i < par.childNodes.length; i++) {
x = par.childNodes[i];
if (childid == x.id) return x;
f = FindChild(x, childid);
if (null != f) return f;
}
return null;
}