Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Aug 14, 2018 8:30 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Trouble with webHTMLViewer and localhost
PostPosted: Tue Apr 30, 2013 8:17 pm 
Offline

Joined: Fri Jun 02, 2006 1:43 pm
Posts: 209
Location: Santa Ynez, CA
I have written some static help files for a web app that I display in a HTMLViewer. It works great when the html files are on the web.
Quote:
Sub ShowHelp (helpfile as string)
dim helppath as string = "http://website.com/helpfiles/"
myHTMLViewer.URL = helppath + helpfile
End sub
but if you move the files to the computer where the app is running, you only get the first help file and subsequent calls to the method with different file names are ignored.
Quote:
Sub ShowHelp (helpfile as string)
dim helppath as string = "file://localhost/helpfiles/"
myHTMLViewer.URL = helppath + helpfile
End sub
and this gets you a "Webpage Not Found" error.
Quote:
Sub ShowHelp (helpfile as string)
dim helppath as string = "http://localhost/helpfiles/"
myHTMLViewer.URL = helppath + helpfile
End sub
Is this a bug or am I doing something wrong? I hope there is a work around or I will end up with a help system like RS where the help never matches the version you're using except beta users.


Top
 Profile  
Reply with quote  
 Post subject: Re: Trouble with webHTMLViewer and localhost
PostPosted: Tue Apr 30, 2013 10:17 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
You should never serve up a url that refers to the local machine. That just won't work. Always refer to the website. (Unless the app is strictly for local use on a single machine.)


Top
 Profile  
Reply with quote  
 Post subject: Re: Trouble with webHTMLViewer and localhost
PostPosted: Tue Apr 30, 2013 11:19 pm 
Offline

Joined: Fri Jun 02, 2006 1:43 pm
Posts: 209
Location: Santa Ynez, CA
This app is an electric power management app that will replace, or perhaps supplement, my present desktop app. The desktop app has all its help files on the same drive as the program. The only reason I can see to store the help files off on a website somewhere is because RS is not capable of serving them from the local drive.

Perhaps I should forget about the URL and read the html data in with a textInputStream then use the LoadPage method to send it to the HTMLViewer.


Top
 Profile  
Reply with quote  
 Post subject: Re: Trouble with webHTMLViewer and localhost
PostPosted: Wed May 01, 2013 12:21 am 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Are you running the app standalone or using a web server like apache? If standalone, then yes, read the file itself and use LoadPage.


Top
 Profile  
Reply with quote  
 Post subject: Re: Trouble with webHTMLViewer and localhost
PostPosted: Wed May 01, 2013 10:10 am 
Offline

Joined: Fri Jun 02, 2006 1:43 pm
Posts: 209
Location: Santa Ynez, CA
Thanks Timshare. Yes. This will be run as a standalone app, either on a PC or in a little Alix linux box as a data logger with the ability to display power usage in graphical form.


Top
 Profile  
Reply with quote  
 Post subject: Re: Trouble with webHTMLViewer and localhost
PostPosted: Wed May 01, 2013 1:47 pm 
Offline

Joined: Thu Apr 18, 2013 8:59 am
Posts: 12
Location: Mexico
Maybe yu can work around this by installing lighttpd webserver, and using your localhost as the repository for your helpfiles (http://127.0.0.1/myhelpfiles/index.html).


Top
 Profile  
Reply with quote  
 Post subject: Re: Trouble with webHTMLViewer and localhost
PostPosted: Thu May 02, 2013 6:08 pm 
Offline

Joined: Fri Jun 02, 2006 1:43 pm
Posts: 209
Location: Santa Ynez, CA
Isn't that going to conflict with the localhost provided by the RS web app? Reading the file into a textInputStream then displaying it with the htmlViewer LoadPage works great.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group