|
-
Apr 27th, 2003, 04:25 PM
#1
Thread Starter
Fanatic Member
Download and Parse Source
I usually don't do this, but I've had issues with looking up code for Javascript (it took me 4+ hours to figure out how to get a table cell to change bgcolor when the mouse was over it), so I'm gonna blatantly ask for some simple (I hope) code.
In a nutshell, I would like this script to, on clicking a hyperlink, download the source code from a webpage (the URL is determined by putting the text of the URL in between two other strings), extract the text string that is between two other text strings, and display that text in a textbox or table cell.
So, (I'm making up the objects and functions/using VB-style functions, but they should make sense):
sURL = "const string 1" + hyperlink.text + "const string 2";
sSource = DownloadSource(sURL);
lStart = FindString(sSource, "const left string");
lEnd = FindString(sSource, "const right string");
sDisplay = SubStr(sSource, lStart, lEnd - lStart);
TextBox.text = sDisplay;
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|