Thanks to everyone (especially Steve Garman) for all the helpful
information. Now I can do _almost_ everything I want to do with
HTMLViewer and HTTPSocket.
For example, I can use HTTPSocket to Get any file (whether it be HTML or
other) - "Socket to me!" - at a particular URL. I can also use
HTMLViewer to view (i.e., display) any (HTML) Web page.
Here, however, is the scenario for what I want to do but cannot do yet.
Suppose HTMLViewer is viewing a particular Web page with links. (The
particular page I have in mind involves forms and cgi, but that may or
may not be important.). Further suppose that the user clicks on a
particular link on that Web page.
What I want at this particular point is for the next page NOT to be
displayed. (Instead I want to retrieve it with HTTP Socket and then
modify it before I use HTMLViewer to display it, since only a small
portion of the new page is relevant to my purposes.)
I've tried using HTMLViewer1.Cancel, but that doesn't seem to work.
Either I'm not doing it right (perhaps I'm putting it in the wrong event
handler) or there's a bug in the particular version of RB that I'm
using. I've also tried using HTMLViewer1.Visible = False and even
trying to superimpose (temporarily) an empty EditField over the
HTMLViewer, but those techniques don't work for me either (again,
possibly because I'm not doing it right, maybe putting my code in the
wrong event handler).
Now, it does "work" to just let the new page load in and be displayed
before I fetch the file with HTTPSocket, modify it, and display my much
smaller version, but it looks rather unprofessional for the program to
display the one page (unnecessary for my purposes) before it replaces it
as soon as it's fully loaded with the modified version that I do want
the user to see.
The bottom line is this: As soon as the user clicks on a link, I want
my program to be in control of the situation so that that new page is
NOT displayed. Then I can display instead my own modified Web page
(which is something that I DO know how to do.)
If you want to see the source code for the particular program I'm
working with at the moment, you can find NTGreek2.zip at
http://traver.org/traverrb/. Click on "Get Verse(s)" to load in the
sample passage (or try one of your own). Then click on a Greek word in
the "GRAMMATICAL ANALYSIS" portion at the top. It looks klutzy. A
lengthy HTML page loads in (which takes a while, because of its loading
in many unnecessary and unwanted graphics files, viz., all the verses in
the chapter that I don't want) before my (much shorter) modified Web
page is viewed, the one I do want displayed.
Any advice?
Barry Traver
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>