how to displaying contents of a field in oBrowser
Phil (OmnisList)
phil at pgpotter.co.uk
Wed Apr 7 17:01:22 UTC 2021
Hi Doug, Mike,
The doc say:
$/setdataurl/()
$/setdataurl/(vData,cMediaType[,cWidth,cHeight]) assigns a data URL for
the supplied data, with the specified media type, to $urlorcontrolname.
vData can be either:
binary - the data represented by the URL
or another type - OBrowser converts the data to character if necessary,
and then UTF-8, to become the data represented by the URL.
cMediaType is a MIME type specifying the type of the data e.g.
text/plain or image/png.
cWidth and cHeight are optional. They are only relevant if vData is
binary, and the data is an image. In this case, the data URL represents
an img of the specified cMediaType, sized using the CSS sizes width and
height e.g.
$/setdataurl/(image, “image/png”, “100%”, “100%”)
Suggesting a limitation to what it can represent?
So, I suspect, as has been suggested, saving it to a temp file(s) first
might work better...
if not very cumbersome...
Just seen your latest reply Doug, how did you send the HTML directly to
oBrowser...
regards
Phil Potter
Based in Chester in the UK.
On 07/04/2021 17:42, Doug Easterbrook 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