views:

38

answers:

3

I have a 3rd party server side control that generates JavaScript and I'd like to see what methods and properties it exposes.

Currently I just type in an invalid function like asdf123() so VS will break and I can add a watch to the variable, but there are a ton of methods and I don't know what I'm looking for (I'm trying to make the control do something undocumented).

What's the best way to approach this until the vendor responds to my help request?

+1  A: 

One good way could be to use firebug(firefox) or debugbar (ie) or you can look into this article where a method tells u the properties of a object

http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256BF8004D72D6

sushil bharwani
+1  A: 
console.dir(myobject);

Then open the console in Chrome and you will have a nice tree structure of your object. (note: myobject is the identifier that references the object that you want to inspect).

-- Šime Vidas http://www.w3viewer.com

Šime Vidas
A: 

I think you can do

str = ""
for (x in obj){
  str = str + obj[x];
}
alert(str);//or doc.write it somewhere
Seeker