I'm having trouble figuring out why my code using HTMLViewer works only part of the time.

Here's the important part of the code:

  M = "<html><head>"
M = M + "<base href=" + chr(34) + "http://www-users.cs.york.ac.uk/~fisher/cgi-bin/"; _
    + chr(34) + ">"
  M = M + "</head>"
  M = M + "<body>"
  M = M + "<a href=gnt?id=" + TheBook + TheChapter + TheVerse _
    + "&xy=><img src=http://www-users.cs.york.ac.uk/~fisher/tmpdir/gnt/"; _
    + TheBook + TheChapter + TheVerse + ".gif"  _
    + " ismap border=0></a><br>"
  M = M + "</body> </html>"

 FileToAccess = GetFolderItem("")
 HTMLViewer1.LoadPage M, FIleToAccess

TheBook, TheChapter, and TheVerse are strings of two-digit numbers, referring to books of the New Testament. For example, for John 1:14, TheBook = "04" (since John is the 4th book of the N.T.), TheChapter = "01", and TheVerse "14". The purpose of the program is to fetch a particular verse (in graphical format) from the Web site of the late Tony Fisher of the University of York.

Here's my problem: Sometimes my program works, and sometimes it doesn't. Sometimes it is able to retrieve the relevant GIF file, and sometimes it isn't. (It displays a brokin graphic icon instead of the relevant GIF picture.)

But at a different time of day, it seems that it may be successful where it was unsuccessful before. That makes me wonder if it's a timeout issue, but HTMLViewer doesn't seem to have anything related to timeout. (HTTPSocket does include reference to timeout, but I'm not using HTTPSocket in this program.)

For example, a few minutes ago the program was able to retrieve Phil. 1:1 (i.e., "110101") but not Phil. 4:4 ("110404"). Yet earlier today it had no trouble handling Phil. 4:4.

Anyone have any suggestions?

Barry Traver

P.S. If you want to see the entire program, you can find VerseLookup1.zip at the following location:

    http://traver.org/traverbw/

_______________________________________________
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>

Reply via email to