Kwa Kil On Swa

Wednesday, December 13, 2006

Javascript object dump

USeful to look inside an object:

alert(DWRUtil.toDescriptiveString(someObject,2));

If there is too much info to fit inside the alert box then use
function popitup2(s) {
newwindow2=window.open("",'name','height=600,width=850');
var tmp = newwindow2.document;
tmp.write('<html><head><title>popup</title>');
tmp.write('<link rel="stylesheet" href="js.css">');
tmp.write('</head><body><p>this is once again a popup.</p>');
tmp.write('<p>' + s + '</p>');
tmp.write('</body></html>');
tmp.close();
}
popitup2(DWRUtil.toDescriptiveString(someObject, 2));

0 Comments:

Post a Comment

<< Home