
function 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
}
closeWindowRequested(spriteRef) - This handler is invoked when the browser
receives a request to terminate the browser window, usually invoked by a
Javascript call (window.close()) in the HTML code. WebXtra will never
automatically destroy the window, but your code can schedule a window
destruction if you want, specially for popup movies. It is important to notice that it
is not recommended to quit the application or forget a window directly from this
callback, as this interrupts normal message processing. Instead, it is recommended
to set a flag or spawn a timeout that will destroy the window after the current
handler has ended its execution. We recommend checking the Complete Browser
sample available at the Tutorials page on our site for a proper implementation of
window destruction.
Lingo example:
on closeWindowRequested spriteRef
--sets a flag to indicate the window should be destroyed
pMustDestroyWindow = TRUE
end
JavaScript syntax example:
function closeWindowRequested(spriteRef){
Online Help
34
Komentarze do niniejszej Instrukcji