In trying to setup a help system in my web app, preparing the help pages in RapidWeaver, I’m apparently unable to show them in a HTMLViewer.
This code placed in the Open event of a HTMLViewer properly works for showing the external page:
[code]dim url as string=“http://www.xojo.com”
me.URL=url
URLfield1.Text=url
URLfield1.Target=2
URLfield1.URL=url
[/code]
The web page is shown in the HTMLViewer and if I click on the WebLink named URLfield1 the page opens in the browser.
But this code doesn’t show anything in the HTMLViewer and if I click on the WebLink URLfield nothing happens:
[code]dim f as folderItem
f=SpecialFolder.Desktop.Child(“TestSite”).Child(“index.html”)
if f<>nil and f.Exists then
me.URL="file://"+f.ShellPath
URLfield.Text="file://"+f.ShellPath
URLfield.Target=2
URLfield.URL="file://"+f.ShellPath
else
MsgBox "Error in URL definition"
end if
[/code]
The URL is coming out as I expect
file:///Users/locvac/Desktop/TestSite/index.html
and if I use the above URL straight in Safari the page is properly shown. What am I doing wrong?
Franco
PS: this is on Mac OS 10.8.5, and Xojo 2014 r2.1