Friday, May 20, 2011

[Tips] Shows Object Contents in Javascript

I've got stuck lately on how to show the content of error object in Javascript (the one like var_dump() function in PHP). But, finally I got this help from stackoverflow.com forum. Thx peter-mortensen and miguel-ventura for your posts. Really brightened-up my day :)

So here's the copy of what the sample code looked like:
alert(object.toSource);
-----
Semoga bermanfaat...