From: Mayayana on 15 Apr 2010 14:22 | The META tag is used to describe the HTML document. | You can give it any name/content values you like, whatever | makes sense for the document. Some common uses are | described at W3schools: | Thanks, but I know all of that. I do a lot with web design, HTAs, scripting, etc. I even once wrote a WYSIWYG HTML editor as a vbscript-powered HTA, to provide people with a "live" documentation of the IE DOM. I'm not trying to find out about the DOM.... I don't know how else to explain this. If you look at the docs for "all" you'll see that META is not listed in "applies to". Further, All("description") and All("keywords") refer to *attributes* of the META tag. Yet the document.All collection is supposed to return elements, not element attributes. I've never seen that before. It's like using All.("valign") or All.("width") to get a collection of valign or width values. (I haven't tried anything like that, but I doubt that it works. And of course it wouldn't be of much use.) So what I was curious to find out about is a list of these irregular properties/functions that are not documented in any docs that I've ever seen -- and that cannot be inferred to exist from the structure of the DOM.
From: Mayayana on 15 Apr 2010 14:48 Hmm. Here's an interesting one. I just tried looping through a typical webpage: For i = 0 to document.all.length - 1 s = s & document.all(i).tagName & ", " Next s: HTML, HEAD, TITLE, META, META, META, LINK, BODY, SCRIPT, DIV, !, TABLE, TBODY, TR, TD, IMG, TD, IMG, TABLE, TBODY, TR, TD, TD, TABLE, !, TBODY, TR, TD, !, !, TD, TABLE, TBODY, ....etc. So it does return ! for a comment. And it returns all other tags, including HEAD, META, etc. That still leaves the question of where all.("description") is coming from. (I'd mistakenly called Description an attribute above, but it's actually just a value for the NAME attribute. So all.("description") is a bit like referring to All.("#FFFFFF"). Strange.
From: Larry Serflaten on 15 Apr 2010 20:10 "Mayayana" <mayayana(a)invalid.nospam> wrote > So what I was curious to find out about is a list > of these irregular properties/functions that are not > documented in any docs that I've ever seen -- and > that cannot be inferred to exist from the structure > of the DOM. Did you click on the name link as I suggested? http://www.w3schools.com/tags/att_meta_name.asp The common names are listed with descriptions. But you can hardly expect to find a complete list because the name and content can hold anything you give it. That's a bit like asking what are all the possible values that a string variable can hold. The list is virtually unlimited.... LFS
From: Mayayana on 15 Apr 2010 21:27
I appreciate your efforts, but you either don't understand the DOM or are not reading my posts fully. *I know about the DOM.* I know about META tags. This code will show the content of the META tag with a name of "DESCRIPTION": Sub window_onload() Dim s, i For i = 0 to document.all.length - 1 If document.all(i).tagName = "META" Then If document.all(i).name = "DESCRIPTION" Then MsgBox document.all(i).content Exit For End If End If Next End Sub That's an interesting find, which I was not aware of before, *because MSDN does not list META in the All collection*. OK. So far so good. But now it turns out that one can return the same thing with: doccument.all("description") That's very strange. It's not in accord with the normal usage of the DOM. Everything found in the All collection is an *element*. In the code above, document.all(i) references an element. Do you know the difference between an element and an attribute? META is an element. NAME is an attribute. "Description" is just the value of the NAME attribute of a META element. So why does document.all("description") work? And what else works that we don't know about? That's what I'm wondering about. DOM, the Missing Manual, so to speak. It may be that META is a lone abberation. I don't know. | Did you click on the name link as I suggested? | | http://www.w3schools.com/tags/att_meta_name.asp | | The common names are listed with descriptions. But | you can hardly expect to find a complete list because | the name and content can hold anything you give it. | | That's a bit like asking what are all the possible values | that a string variable can hold. The list is virtually | unlimited.... | | LFS | | |