Hi folks, hoping someone can use there superior knowledge on this one as i've hit a brick wall and can't get round it.
I have a page which pulls the html source from a webpage and assigns it to a variable, all works ok, no probs here.
What i need to do is loop through the html and find each instance of a particular string and perform a check against it.
For example, the page contains, amongst other normal html tags etc, several of the following images...
<TD align=center>
<img alt='SERVER0201' src='../images/2.gif' height=18 width=18>
<img alt='SERVER0201' src='../images/1.gif' height=18 width=18>
</TD>
I need to search the html for the string "SERVER0201" and then check each instance wether it has 2.gif or 1.gif.
If all instances have 1.gif, assign a variable called "servStatus" to "OUT" or if all instances have 2.gif (or a mixture of the two) then assign the variable to "IN"
I have managed to find the first instance using "IF instr(sourcetext,"SERVER0201")..." where sourcetext is the HTML source.
Any idea how i can acheive the required result?
Thanks
Pete
I have a page which pulls the html source from a webpage and assigns it to a variable, all works ok, no probs here.
What i need to do is loop through the html and find each instance of a particular string and perform a check against it.
For example, the page contains, amongst other normal html tags etc, several of the following images...
<TD align=center>
<img alt='SERVER0201' src='../images/2.gif' height=18 width=18>
<img alt='SERVER0201' src='../images/1.gif' height=18 width=18>
</TD>
I need to search the html for the string "SERVER0201" and then check each instance wether it has 2.gif or 1.gif.
If all instances have 1.gif, assign a variable called "servStatus" to "OUT" or if all instances have 2.gif (or a mixture of the two) then assign the variable to "IN"
I have managed to find the first instance using "IF instr(sourcetext,"SERVER0201")..." where sourcetext is the HTML source.
Any idea how i can acheive the required result?
Thanks
Pete