Help with displaying content(pdf) inside revbrowser please
Posted: Thu May 26, 2016 12:02 am
Hey, I've been trying some tutorials online to display links/files/PDFs without using an external program. They have been saying to use revBrowser and the google button works at loading google inside the stack, but the search for pdf button tries to open it in firefox and not inside the stack. The tutorials all say (I've looked at many) that this should work. Any idea what I'm doing wrong?
The app is just one stack with an image thing and two buttons
here is the stack code
google button
pdf search button
The app is just one stack with an image thing and two buttons
here is the stack code
Code: Select all
global myBrowser
on browserOpen
if myBrowser is empty then
put revBrowserOpen(the windowid of this stack,"") into myBrowser
end if
revBrowserSet myBrowser, "showborder","true"
revBrowserSet myBrowser, "visible","true"
revBrowserSet myBrowser, "rect",rect of image "bwin"
end browserOpen
on browserClose
revBrowserClose myBrowser
put empty into myBrowser
end browserClose
on browserSetURL pURL
## Set the url to be displayed to the given url
revBrowserSet myBrowser, "url", pURL
end browserSetURL
Code: Select all
global myBrowser
on mouseUp
browserOpen
revBrowserSet myBrowser , "url", " google (.) com"
end mouseUp
Code: Select all
global myBrowser
on mouseUp
browserOpen
local tFile
answer file "Please choose the file you would like to display" with type "PDF document|pdf|PDF"
if it is not empty then
put it into tFile
--revBrowserSet myBrowser , "url", tFile
browserSetURL tFile
end if
end mouseUp