The NeoBook WebBrowser object currently allows you to link to an Internet address, to an external local HTML file, to a Variable or to an Embedded file.
But if you had the option of "Paste HTML Directly" into the WebBrowser object itself, that would be a lot easier to make changes to the HTML without having to look for its filename somewhere on your hard drive. The pasted HTML would just be a flat text block inside the WebBrowser object and easy to find....
It could be similar to the Function Library so the PUB file would not get too big, but each WebBrowser object could have its own built-in HTML editor that automatically opens the HTML code you pasted into it...
"Paste HTML Directly" into WebBrowser object
Moderator: Neosoft Support
Re: "Paste HTML Directly" into WebBrowser object
This is what most of use the BrowserLoadFromString command for.
David Payer
Des Moines, Iowa
USA
Des Moines, Iowa
USA
Re: "Paste HTML Directly" into WebBrowser object
I did try that... Here's my question: Suppose I want to put a block of HTML into my WebBrowser2. The Action tabs for WebBrowser2 are: Before Navigate, Dowload Begin, Complete, Navigate Complete. But if I put BrowserLoadFromString into any of those tabs, nothing happens. If I put BrowserLoadFromString into a button or into other object's Action, then it works okay: my HTML loads into WebBrowser2. But the button might actually be some pages away from WebBrowser2 in my design display. The only way to locate the particular HTML code that loads into WebBrowser2 is by remembering where it is in the object list, or to open each one by one (it is probably no harder to look up .html files on the hard drive)....dpayer wrote:This is what most of use the BrowserLoadFromString command for.
I thought it would be more intuitive to edit the HTML code directly in the tab of the WebBrowser object that it appears in, rather than to edit it somewhere else....
.
Re: "Paste HTML Directly" into WebBrowser object
fkapnist:
a) insert a block of HTML within the current HTML being rendered in the specified WebBrowser object ?
or
b) replace the current HTML being rendered in the specified WebBrowser object ?
Did you mean ...Suppose I want to put a block of HTML into my WebBrowser2
a) insert a block of HTML within the current HTML being rendered in the specified WebBrowser object ?
or
b) replace the current HTML being rendered in the specified WebBrowser object ?
Re: "Paste HTML Directly" into WebBrowser object
fkapnist:
Now, you can manage all such HTML Strings in one place ... F12 ... and then navigate to the desired SubRoutine.
A variation of this could be a single Called Function that is passed a similarly named parameter.
You might consider placing each BrowserLoadFromString command in a SubRoutines ... and give each SubRoutine a name that is easy to understand/distinguish e.g. RenderAbcInBrowser2 ... and do GoSub to these SubRoutines from inside the Button code.But the button might actually be some pages away from WebBrowser2 in my design display. The only way to locate the particular HTML code that loads into WebBrowser2 is by remembering where it is in the object list,
Now, you can manage all such HTML Strings in one place ... F12 ... and then navigate to the desired SubRoutine.
A variation of this could be a single Called Function that is passed a similarly named parameter.