New topic: 

Trouble with webHTMLViewer and localhost

<http://forums.realsoftware.com/viewtopic.php?t=47752>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        dgdavidge          Post subject: Trouble with webHTMLViewer and 
localhostPosted: Tue Apr 30, 2013 8:17 pm                         
Joined: Fri Jun 02, 2006 1:43 pm
Posts: 200
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 subbut 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 suband 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 subIs 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                timhare          Post subject: 
Re: Trouble with webHTMLViewer and localhostPosted: Tue Apr 30, 2013 10:17 pm   
                      
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12270
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                dgdavidge          Post 
subject: Re: Trouble with webHTMLViewer and localhostPosted: Tue Apr 30, 2013 
11:19 pm                         
Joined: Fri Jun 02, 2006 1:43 pm
Posts: 200
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                timhare          Post subject: 
Re: Trouble with webHTMLViewer and localhostPosted: Wed May 01, 2013 12:21 am   
                      
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12270
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             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to