fkapnist:
This is a javascript that runs a Neobook Action... so what should "win=window.open" be replaced with?
The javascript pops up a new (IE) window and loads the following content within it ...
- Code: Select all
"<HTML><HEAD><TITLE>My Test Page</TITLE></HEAD><BODY BGCOLOR=FFFFFF><FONT face=Tahoma size=2 color=000000></BODY></HTML>"
The suggested solution is to use
CustomWindow as the (simulated) popup window.
Say the
WebBrowser object in the
Container is called
WebBrowser6 ... then your command ...
- Code: Select all
BrowserLoadFromStr "WebBrowser6" "<HTML><HEAD><TITLE>My Test Page</TITLE></HEAD><BODY BGCOLOR=FFFFFF><FONT face=Tahoma size=2 color=000000></BODY></HTML>"
... will populate the WebBrowser object with this content.
And if the
Container object that hosts the
WebBrowser object is called
Container3, then this subroutine ...
- Code: Select all
:Container3_OnOpen
BrowserLoadFromStr "WebBrowser6" "<HTML><HEAD><TITLE>My Test Page</TITLE></HEAD><BODY BGCOLOR=FFFFFF><FONT face=Tahoma size=2 color=000000></BODY></HTML>"
Return
... will make sure that the desired HTML is loaded each time you invoke the
CustomWindow command in your pub.
Or how do I send the JS "document.writIn" code to a Neobook WebBrowser object? In that case, what should "win=window.open" be replaced with?
If all you want to do is have this HTML run in a
WebBrowser object (on some page of your pub), just invoke the ...
- Code: Select all
BrowserLoadFromStr "WebBrowser6" "<HTML><HEAD><TITLE>My Test Page</TITLE></HEAD><BODY BGCOLOR=FFFFFF><FONT face=Tahoma size=2 color=000000></BODY></HTML>"
... command somewhere on that page (e.g. PageEnter event section or Click of a Button etc.).