[RESOLVED] getelement by class, value within input, td, span, etc.
There are a couple of websites that have a lot of td's. They don't have names or ids but they do have classes or values. The classname or value is the same for many of the tds. How can I get for example the 5th instance of a classname or value on a web page that is also a td? Something like this maybe:
range("a2").value = appIE.document.getelementbytagname("td").classname(4).innertext
I've run across this with span instead of td and value instead of classname too, I'm not sure how to approach 2 layers of sameness like that.
Re: getelement by class, value within input, td, span, etc.
Quote:
value instead of classname too
you can loop through, until you match value but span and class you have to parse the innerhtml and increment a counter until you get to the specific element
else you can use code similar to the example in your other thread, which matches to value then returns the next td
Re: getelement by class, value within input, td, span, etc.
Loop through the elements, looking for the 5th instance of HTMLTableCell.className = "YourClassName".
Re: getelement by class, value within input, td, span, etc.
is there no other absolute match you can make
here to guide
Re: getelement by class, value within input, td, span, etc.
For a simpler example, how can I go directly to an element by knowing it is the nth element with a specific classname? Without looping through all of the elements that have the same classname. Like if the classname is "someClass" then something like this: ie.document.someClass(4) or ie.document.getelementsbyclassname("someClass")(4) to access only the 5th one.
What is the right syntax?