woensdag 26 augustus 2009

Obscure AJAX error htmlfile: Unknown runtime error

Hi All,


Just a quick post to let you know of a sneaky little problem that only occurs in Internet Explorer. If you ever receive this error :


htmlfile: Unknown runtime error



The problem seems to be that you have multiple form tags within your one page. I stumbled across it because I
had created a user control in the past and didn't remember that it had a form tag in it.

Ok so that is the solution, but to be honest my work around won't work for everyone because I worked out
how to get rid of the form tags, the same might not go for everyone else.

BUT, remember, form tags!!!

Hope this helps,
Bert

woensdag 19 augustus 2009

Get Elements By Class Name


1.function getElementsByClassName(classname, node) {
2. if(!node) node = document.getElementsByTagName("body")[0];
3. var a = [];
4. var re = new RegExp('\\b' + classname + '\\b');
5. var els = node.getElementsByTagName("*");
6. for(var i=0,j=els.length; i7. if(re.test(els[i].className))a.push(els[i]);
8. return a;
9.}