[thelist] JavaScript Question
Jon Hall
jonhall at ozline.net
Mon Oct 29 17:54:39 CST 2001
Here is what the function I use to view the DOM live. I slightly modified it
from an article on the O'Reilly site. I usually just call it onclick it the
element is visible. Something like:
<button name="foo" onclick="inspect(this)">bar</button>
function inspect(elm) {
popup =
window.open('','popup',config='height=250,width=250,screenX=100,screenY=100,
top=100,left=100,resizable=yes,menubar=yes,scrollbars=yes');
var str = "<table>";
for (var i in elm.document) {
str += '<tr><td><b>' + i + '</b></td>' + '<td><b>' +
elm.getAttribute(i) + '</b></td></tr>';
}
str += '</table>';
popup.document.write(str);
}
jon
----- Original Message -----
<snip>
Do you have some dynamic debugging
> tools that would allow me to view the DOM after I modify it dynamically?
> Or some suggestions for debugging?
>
> thanks,
>
> - ianO -
>
> Ian Ornstein - Programmer and Web Developer
> IBM Global Services, Global AMS Delivery
> (704) 509-8022
More information about the thelist
mailing list