Strongm,
I say this meaning that different webpage designers use different techniques to put links within a web page. Not everybody uses <a href="
here</a> If this were the case then there would be no problem finding the link, but what about when the link is a cgi query? Then it may only look like =http:// . Sure, you can only look for the http:// part, but then what about the links that do not have their base URL added to them--which is the case of many many webpages? I should have refrained from saying difficult, because it's not *that* difficult, however, it is difficult to explain without writing a book and perhaps that's what I should have said
Hilbert,
There may be a better way, and if there is, then I'd like to know, but this is essentially how I do it...
Function Gettext(strText, strStarttag, strEndTag)
Dim intStart
intStart = InStr(1, strText, strStarttag, vbTextCompare)
If intStart Then
intStart = intStart + Len(strStarttag)
intend = InStr(intStart + 1, strText, strEndTag, vbTextCompare)
Gettext = Mid(strText, intStart + 1, intend - intStart - 1)
Else
Gettext = " "
End If
End Function
What happens here is that the webpage lies within strTEXT and the identifiers are strStartTag and strEndTag. The function first checks to see if the strStartTag is in the document by using the Instr() function. Instr() returns the position of strStartTag within strTEXT as long. Then, if strStartTag has a value in it, meaning the Instr()function found something, then the length of strStartTag is added to the position of the first letter of strStartTag, and it is at this postion where the program starts to look for the strEndTag. Once it finds it, then the GetText Function returns the text between the two tags. So, If you were to use this code to look for the information, then you would make your strStartTag "id='tr5' onClick='" and your strEndTag ";' onMouseOver" GetText() will return "makeSelection(5)" .
Ok, now that this is done, you need to add the base url to this in order for it to be a valid HTTP request. How you go about this has to do with how you navigate to the webpage. We will need to know what the text in the URL box of your regular webbrowser looks like once you click this link. Does it look like
or something like
?
Let's see how I did? hehe.
LF