Source language: Translate to:

"Paste HTML Directly" into WebBrowser object

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

"Paste HTML Directly" into WebBrowser object

Postby fkapnist » Sat Dec 06, 2014 8:33 pm

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....

Image

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...

:?:
User avatar
fkapnist
 
Posts: 348
Joined: Mon Nov 17, 2014 4:24 pm
Location: Greece

Re: "Paste HTML Directly" into WebBrowser object

Postby dpayer » Mon Dec 08, 2014 8:04 am

This is what most of use the BrowserLoadFromString command for.

Image
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1382
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: "Paste HTML Directly" into WebBrowser object

Postby fkapnist » Mon Dec 08, 2014 11:39 am

dpayer wrote:This is what most of use the BrowserLoadFromString command for.

Image


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)....

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....

:roll:
.
User avatar
fkapnist
 
Posts: 348
Joined: Mon Nov 17, 2014 4:24 pm
Location: Greece

Re: "Paste HTML Directly" into WebBrowser object

Postby Gaev » Mon Dec 08, 2014 1:02 pm

fkapnist:

Suppose I want to put a block of HTML into my WebBrowser2

Did you mean ...

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 ?
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: "Paste HTML Directly" into WebBrowser object

Postby Gaev » Mon Dec 08, 2014 1:15 pm

fkapnist:

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,

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.

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.
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest