Director shortcomings; Rev/altBrowser the solution?

Chipp Walters chipp at
Mon Sep 20 12:20:53 EDT 2004

Hi Stephen,

It sounds like the Rev/altBrowser combo should do the trick with a 
couple of caveats. As you probably know, altBrowser is an embedded 
browser for Revolution. It uses IE in Win2000/XP and Safari in Mac OSX 10.3+

If you're using an earlier version of the MacOS, then it won't work. 
This is a limitation of Apple's WebKit API. Also, neither the Mac nor 
the PC version has been tested using multiple instances of the 
altBrowser. Though, theoretically possible, it takes more complicated 
scripting, and is not a simple proposition. As such, we do not intend to 
support multiple instances in a single project. Tabbed browsing in 
Safari is not supported.

We are in the advanced beta stage (with several list members) and are 
down to 1 bug on the Mac version.

Listed below are the commands, functions and properties supported by 


Initiallizes and starts the browser external

Xbrowser_Open [windowID],[default URL]

Closes the external

Displays the previous page URL (if exists)

Displays the next page URL (if exists)

Refreshes the browser with the current page URL

Stops loading current page URL

takes the focus off of altBrowser.

Properties which can be set by a command:

for instance:

XBrowser_Set "rect",rect of image "browserimage"
is a command which sets the rect of of the browser window

XBrowser_Set "rect",prect
Sets the rect of of the browser window to prect (a valid rect)

XBrowser_Set "url",pURL
Sets the URL for the browser window to tURL
ex. XBrowser_Set "url", ""

XBrowser_Set "newwindow",false
If set to false, Any external window URL's will be forwarded to the 
XBROWSER_newURLWindow callback handler. If set to true, will 
automatically load external window URL into existing window.

XBrowser_Set "visible",true
Sets the browser visibility

XBrowser_Set "offline",true
Sets the offline mode of the browser

XBrowser_Set "contextmenu",true
Sets the context menu mode of the browser (so you can right-click on the 
browser page and view source for instance)

XBrowser_Set "scrollbars",true
Sets the display mode of scrollbars for the browser
Typically, this should be set to true. Safari on the Mac platform will 
not show scrollbars unless the content in the window dictates it. On PC, 
the vertical scrollbar will always show if this is set to true. This 
command most useful on PC, not Mac.

XBrowser_set "showborder",true
Sets the display mode of the browser border. On PC this will remove 
completely the border. On the Mac you can only 'de-emphasize' the border.

Functions which lookup Property values

for instance:

set the hilite of btn "bVisible" to XBrowser_Get("visible")
uses a function to set the status of a button.

Retrieves the browser visibility

Retrieves the offline mode of the browser

Retrieves the context menus mode of the browser

Retrieves the scrollbar mode of the browser

Retrieves the showborder mode of the browser

Retrieves the current html source being displayed by the browser

Retrieves the current page URL of the browser

Retrieves the version number of altBrowser

Callback Handlers
Callbacks are sent back to the stack upon certain events.

XBrowser_newURLWindow turl
Message sent when a new window is trying to be opened.

on XBrowser_newURLWindow turl
    answer "link trying to open in new window:"&cr&turl
    XBrowser_Set "url",turl
end XBrowser_newURLWindow

on XBROWSER_NavigateComplete turl
Message sent when navigation to a page URL is complete

on XBrowser_NavigateComplete turl
    put "-NavigateComplete- "& turl
end XBrowser_NavigateComplete

on XBrowser_BeforeNavigate turl
Message sent right before navigation to a page URL

on XBrowser_NavigateCompleteFrame turl
Message sent when navigation to a frame URL is complete

on XBrowser_BeforeNavigateFrame turl
Message sent right before navigation to a frame URL

on XBrowser_DocumentComplete turl
Message sent when the browser object is finished rendering the page URL

on XBrowser_DocumentCompleteFrame turl
Message sent when the browser object is finished rendering the frame URL

on XBrowser_RequestDownload turl
Message sent when the browser is processing a click for a MIME type it 
cannot display.  This would typically be handled as a download request. 
  The PC automatically issues a file dialog, but the mac sends this 
message back to RunRev to let it handle the download decision.

on XBrowser_Closing
Message sent when the browser is finished closing

Van Esch, Stephen (Bolton) wrote:

> So, can anyone tell me if the Rev/altBrowser combination is the best way to
> go with this? 

More information about the use-livecode mailing list