JavaScript - Debug object model

There are times when we are working with JavaScript and just can't remember the exact object name. Here's a little snippet to stick in your code that will allow you to iterate through the object model and stop when you've found what you need.

There are times when we are working with JavaScript and just can't remember the exact object name. Here's a little snippet to stick in your code that will allow you to iterate through the object model and stop when you've found what you need.

var oCtrl;
try {
for (oCtrl in document)
{ if (confirm(oCtrl) == false) { break;}}
}
catch(everything) { alert('error found'); }


Submission Date:  9/23/2005 3:03:31 PM
Submitted By:  Robbe Morris
My Home Page:  http://www.robbemorris.com

By Robbe Morris   Popularity  (326 Views)
Picture
Biography - Robbe Morris
Robbe has been a Microsoft MVP in C# since 2004. He is also the co-founder of NullSkull.com which provides .NET articles, book reviews, software reviews, and software download and purchase advice.  Robbe also loves to scuba dive and go deep sea fishing in the Florida Keys or off the coast of Daytona Beach. Microsoft MVP