}
}
openNewWindow(spriteRef) - This handler is called by the Xtra sprite when the
browser receives a request to create a new popup window. There are three possible
return values:
a) True (or 1) indicates that the operation should be allowed. The browser will
create a standard, independent floating browser window, not controlled by the Xtra.
b) False (or 0) blocks the creation of the new popup window.
c) Advanced users can also instruct the browser to use an existing WebXtra
browser window to handle the request. This is done by passing the
"browserReference" property of any WebXtra sprite as a return value. The
"Complete Browser" sample movie distributed with the Xtra has a full
implementation of this behavior, where a new movie in a window is created to
handle all popup requests. You can also return the the same browser window as the
target of the popup operation, but some web sites do not handle this situation well
and may generate Javascript errors in their pages. See the examples below:
Lingo example:
on openNewWindow spriteRef
--if we want to reuse the existing browser sprite for the new window:
--return spriteRef.browserReference
--
--to allow the independent window to be created:
--return true
--
--in this case we want to block all popups
return false
end
JavaScript syntax example:
Online Help
33
Kommentare zu diesen Handbüchern