Click to See Complete Forum and Search --> : getting tags content


marko_one
09-18-2003, 08:35 AM
Hi All,

I was wondering if it is possible to read the content of a meta tag when the document loads?

such as

<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">

The reason I want to know this is because I am developing a very basic web site, and someone keeps editing it with frontpage which then creates more work for me straightening out his mess. I would like to check this so that I can create an error log with ip address so that I can catch them out.

any ideas?

thankx

Marko.

Khalid Ali
09-18-2003, 08:40 AM
DOM is a powerfull tool that gives you great ability to manipulate the HTML document.

var metaTags = document.getELementsByTagName("meta");

this will return a NodeList( an array of meta tags)

you can loop through metaTags in a loop

var len = metaTags.length;

and then in the loop you can get attributes for each metat tag and see whats their values