how to displaying contents of a field in oBrowser

Doug Easterbrook doug at artsman.com
Wed Apr 7 16:57:07 UTC 2021


hi all:

and then shortly after I gave up, reg comes to the rescue (thanks reg) with the following.

which I’d tried, but didn’t work the first time.. (Omnis wouldn’t tokenize it)..   so retying the command and now it works.


it left an interesting side effect….        sending the HTML to obrowser directly doesn’t seem to follow links embedded in the HTML to get the relevant CSS and such (at least not yet - another problem to figure out).

whereas writing to file — seems to cause oBrowser to read all links embedded within the html.


i.e.   
1) I now have success sending the HTML directly to the obrowser component, but none of the bootstrap themes show.  

2) whereas the bootstrap css and links work does if I  send a file:///…… to the obrowser’s    $urlorcontrolname


a little more exploring is required, I think :)

thanks all



On April 7, 2021, at 8:49 AM, Reg Paling <reg.paling at lokanet.com> wrote:

Hi Doug,

Do $cinst.$objs.MyoBrowserField.$setdataurl(MyHTML,"text/html")

Where MyHTML is a binary variable containing the HTML

Kind regards,
Reg




Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978

> On April 7, 2021, at 9:42 AM, Doug Easterbrook <doug at artsman.com> wrote:
> 
> hi Mike.
> 
> thanks for the hint.  I had aa look at past references to $setdataURL ans tried it our with mime type of ’text/html’ ….    but no luck.
> 
> Alex Clay kept on falling back to write it as a file, so I’m reorganizing code a little at the moment for.a quick and dirty save to file.
> 
> 
> If anybody else has the secret, love to hear of it.
> 
> 
> 
> Doug Easterbrook
> Arts Management Systems Ltd.
> mailto:doug at artsman.com
> http://www.artsman.com
> Phone (403) 650-1978
> 
>> On April 7, 2021, at 8:34 AM, Mike Matthews - Omnis <omnis at lineal.co.uk> wrote:
>> 
>> Hello Doug,
>> 
>> I remember something like this, but not sure.  What does the runtime method called $setdataurl do?  Otherwise I’m not sure.
>> 
>> But I have struggled and succeed with some base64 stuff from the Remote Form RTF object (jsRich), where you can embed graphics into a writing field using the Quill code.  Now I can pull out those images and save them to disk.
>> 
>> Thanks to Mike Motter for that help in 2019.
>> 
>> Mike
>> 
>> 
>> 
>> On 7 Apr 2021, at 16:10, Doug Easterbrook <doug at artsman.com<mailto:doug at artsman.com>> wrote:
>> 
>> 
>> I’m sure somebody has done this, so I’m looking for a quick hint.
>> 
>> I have a field that contains a full web page.   lets call it     MYDATA
>> 
>> 
>> I want to get oBrowser to display that full web page without writing the contents to a file and thne displaying it.
>> 
>> i.e.   I know I can
>> 1) write the contents of MYDATA to a file
>> 
>> 2) give $urlorcontrolname the path name to the file and it will display
>> 
>> 
>> I’m hoping there is a way to simply give oBrowser the contents of MYDATA and show the web page.
>> 
>> 
>> anybody done that. (and willing to share the code shortcut).
>> 
>> 
>> thanks in advance.
>> 
>> 
>> Doug Easterbrook
>> Arts Management Systems Ltd.
>> mailto:doug at artsman.com
>> http://www.artsman.com
>> Phone (403) 650-1978
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list