Sat, Jan 29 2005 2:13 PM Ernst Wolthaus

Usefull bit of javascript

Even though .NET and ASP.NET keeps getting better and better, a lot of times we still need to use javascript on the client to reduces roundtrips or to get more dynamic websites.

So here's a piece of javascript code I find very usefull to show the properties of any (HTML) object:

function ShowProps(obj)
{
  var names = "";
  for (var name in obj) names += name + "; ";
  alert(names);
}

Be carefull, allthough it enumerates all user-defined properties, it doesn't enumerate certain predefined props or mehods...

Filed under:

# Javascript and prototype

Monday, January 31, 2005 5:32 AM by TrackBack

# Javascript and prototype

Monday, January 31, 2005 5:34 AM by TrackBack

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 1 and 2 and type the answer here: