Re: VBS GetElementByClassName custom function
- From: "Anthony Jones" <Ant@xxxxxxxxxxxxxxxx>
- Date: Tue, 9 Oct 2007 14:45:21 +0100
"mayayana" <mayaXXyana1a@xxxxxxxxxxxxxxxx> wrote in message
news:%23vuKffnCIHA.3400@xxxxxxxxxxxxxxxxxxxxxxx
document.getElementsByTagName("*")I may be misunderstanding what you want to
do, but if you want all elements of a certain class,
can't you just use Document.All and check the className
attribute of each Item in All?
document.all would be equivalent to doing
so the OP is still left with all the original problems with the port.
Yes, but it's easy enough to filter those by tagName
and then className, or vice versa. I'm confused as to why
there would be any reason to even consider bringing XML
or RegExp into it when simple DOM does the job.
The XML came in to it because the OP wants to output a new DOM containing
the selected nodes. Unfortunately it isn't possible to insert nodes from a
HTML document into an XML document.
The RegExp comes into it from the source JScript to determine whether a
specific node has a specific class name in its class attribute. Whether the
node is retrieved by looping 'getElementsByTagName("*")' or by 'all' this
test needs to be done. As I explained in an earlier post the class
attribute may contain multiple class names.
--
Anthony Jones - MVP ASP/ASP.NET
.
- References:
- VBS GetElementByClassName custom function
- From: mrique
- Re: VBS GetElementByClassName custom function
- From: Anthony Jones
- Re: VBS GetElementByClassName custom function
- From: mrique
- Re: VBS GetElementByClassName custom function
- From: mayayana
- Re: VBS GetElementByClassName custom function
- From: Anthony Jones
- Re: VBS GetElementByClassName custom function
- From: mayayana
- VBS GetElementByClassName custom function
- Prev by Date: Re: VBS GetElementByClassName custom function
- Next by Date: Printer Login Logic?
- Previous by thread: Re: VBS GetElementByClassName custom function
- Next by thread: Re: VBS GetElementByClassName custom function
- Index(es):
Relevant Pages
|