Mark Wagner's .NET C# Cogitation

.NET Architect and Developer - Simple Thoughts from a Simple Mind

  Home :: Contact :: Syndication  :: Login
  90 Posts :: 59 Articles :: 1548 Comments :: 187 Trackbacks

News

You can download this .TEXT blog skin free. Download Cogitation Blue skin.
Updated May 6, 2004

My Sites
- New SharePoint Blog
- My Developer blog
- My Personal blog
ASP.NET Web Hosting
I host my site here. The best value for quality hosting. Read my opinion here. If you decide to join, please use this link. Thank you very much.


Legal
Any and all code, software, examples, suggestions and anything else on this web site is available for you to use at your own risk. No warranty is express or implied.
Views and Opinions
Mark Wagner works for Microsoft in the Consulting Services division and covers the West Region. The views and opinions expressed on this web site are not necessarily the views or opinions of his employer.

Article Categories

Archives

Post Categories

.: Architecture Links :.

.: Developer Links :.

.Text and RSS Links

Blog Roll - Top Guns

Developer: .NET Security

Developer: C# Team

Developer: Flash

Developer: JavaScript

Developer: Pocket PC

Personal: Aviation

Personal: Favorites

Below is a small JavaScript application that allows you to browse through various objects on the DOM as well as JavaScript variables.  I wrote this in an attempt to better understand the differences between various web browsers, specifically Internet Explorer, Netscape, and Firefox.

You can download my sample.

You will find a top level window object with all its immediate children located blow.  Links are available on child objects where appropriate.  This is 100% driven by looking at each object property generically, meaning, nothing is hard-coded.  This allows any of your custom JavaScript variables (in a Netscape browser its even better) to be viewed.

Areas I found of particular interest:

  • the windows.document node of the tree.
  • functions will appear with a function link.  Clicking on this link will reveal the JavaScript for that function.
  • the window.top.document.scripts link will list all the script tags, and the associated script if the actual script is embedded within the document.

I hope to improve and use this when debugging scripts.  Again, by adding two small links to javascript (via script tags) this becomes available on any page I like.

<SCRIPT language=javascript src="http://www.crsw.com/blogs/Mark/Files/castleJSHelper.js"></SCRIPT> <SCRIPT language=javascript src="http://www.crsw.com/blogs/Mark/Files/castleJSObjectBrowser.js"></SCRIPT>

These javascript files are available for download (above) so that you can reference these files on your server.

Below is the results of simply adding two script tags to make this available in this post.  Click away!  The sample starts below this line:


posted on Wednesday, December 22, 2004 12:49 PM

Feedback

# JavaScript Object Browser Sample 12/24/2004 6:16 PM Kent J. Chen's Weblog


# JavaScript Object Browser Sample 12/24/2004 6:19 PM Kent J. Chen's Weblog


# re: JavaScript Object Browser Sample 1/16/2005 8:18 AM Joel Martinez
wow ... this needs to be a freakin' browser extension :-D

# JavaScript Object Browser 2/12/2005 4:07 PM Mark Wagner's .NET C# Cogitation


# re: JavaScript Object Browser Sample 2/13/2005 12:28 AM Hermann Klinke
Oh god, I just love this.

# re: JavaScript Object Browser Sample 6/24/2005 6:24 AM Ted
Is there a way to have this info printed to another window for easier viewing, and to possibly keep the original content in the original window?

Post Feedback

Title:
Name:
Url:
Comments: 
Enter the code you see: