Page 1 of 2
widget Browser not opening URL with picture
Posted: Mon Nov 26, 2018 8:30 pm
by Youks
Hi All,
After some testing I am unable to open an URL containing a GIF or JPEG with the widget whereas it works properly when creating a mobile browser, any known issues ?
By the way is it possible to load a GIF or JPEG through the browser, rotate the picture and display it back through the browser?
Thx in advanve.
Best regards
Re: widget Browser not opening URL with picture
Posted: Mon Nov 26, 2018 9:10 pm
by [-hh]
Sometimes the browser widget can't load "https:"-addresses. Try as "http:" or try to set the userAgent of the widget.
Images in the browser can be rotated directly in the browser using CSS (do "..." in widget "browser").
Re: widget Browser not opening URL with picture
Posted: Mon Nov 26, 2018 9:27 pm
by FourthWorld
[-hh] wrote: ↑Mon Nov 26, 2018 9:10 pm
Sometimes the browser widget can't load "https:"-addresses. Try as "http:" or try to set the userAgent of the widget.
Images in the browser can be rotated directly in the browser using CSS (do "..." in widget "browser").
Do we have a bug report on that? HTTPS adoption is growing rapidly.
Re: widget Browser not opening URL with picture
Posted: Mon Nov 26, 2018 9:43 pm
by Youks
Hi Hernann,
Thx surprisingly the "http" vs "https" did the trick but i think it should be fixed or mentioned.
Could you kindly provide a hint regarding the userAgent method?
Being a total noob in java , will anything like (do" transform....rotate...") do what expected or is it a little more complex?
Thanks a million !
Re: widget Browser not opening URL with picture
Posted: Mon Nov 26, 2018 10:02 pm
by [-hh]
Hi Youks,
please report the address of the image that didn't load by "https:" to
https://quality.livecode.com
so that they can look into it.
Or post the address here.
This is probably a situation when "ordinary" browsers open a security dialog...
(I checked just now that for example on Mac the widget sets the same userAgent as Safari, so that's not the reason.)
Re: widget Browser not opening URL with picture
Posted: Mon Nov 26, 2018 10:16 pm
by Youks
Done.
Bug 21716 submitted .
Re: widget Browser not opening URL with picture
Posted: Mon Nov 26, 2018 10:30 pm
by [-hh]
Rotate an image in the browser widget.
Code: Select all
on mouseUp
set htmltext of widget "browser" to fld "HTML"
put "var d=document.getElementById('youks1');" & \
"d.setAttribute('style','" & \
"-webkit-transform:rotate(90deg); transform:rotate(90deg);" & \
"transform-origin:50% 50%;')" into js
do js in widget "Browser"
end mouseUp
fld "HTML":
<html><head></head><body>
<div id='youks1'><img src='
http://hyperhh.de/TEST/Buchenberg640x480.png' alt='Rock my soul'></div>
</body></html>
Re: widget Browser not opening URL with picture
Posted: Mon Nov 26, 2018 11:02 pm
by Youks
Thank you so much Hermann!
It's a great start to understand how this works! I have put that into place , the picture shows up but temporarily rotates after few mouseUp and regains initial state. Is that what it is supposed to do or a step is missing?
Regards
Re: widget Browser not opening URL with picture
Posted: Mon Nov 26, 2018 11:21 pm
by Youks
Disregard my last comment !!!
I set the URL in an openCard and use the button only for the rotation and it works great!!! Thank you so much !! You Rock !!

Re: widget Browser not opening URL with picture
Posted: Mon Nov 26, 2018 11:44 pm
by [-hh]
This should work also in one go. But it's better to separate the call for the htmltext.
You could also use "load url" on openCard, so users with a slow connection get more time.
And later on (when the image is no longer needed) use "unload url".
Then the image is loaded (fast) from cache every time you set the htmltext.
p.s. Did you already try to use widget imageWidget (see "Sample Stacks")?
It loads also remote sources and rotation is very easy. And you don't need javaScript for that.
Re: widget Browser not opening URL with picture
Posted: Tue Nov 27, 2018 5:54 am
by Youks
No Hermann, I haven't explored the imageWidget....Ahhh I have just noticed it ......I'll try it !! Thx......
Re: widget Browser not opening URL with picture
Posted: Tue Nov 27, 2018 6:33 am
by Youks
Amazing Job !!! Thank you!!

Re: widget Browser not opening URL with picture
Posted: Tue Nov 27, 2018 9:04 am
by Youks
Dear Hermann,
I couldn't make the imageWidget work on android. I have created a single card with the widget and the preloaded picture but when built the card is empty.
PS: tried LC9.01 & 9.0.2 RC1 and minimum built KitKat 4.4
Re: widget Browser not opening URL with picture
Posted: Tue Nov 27, 2018 10:24 am
by LiveCode_Panos
Hello all,
If you use a https URL with the browser widget, you have to make sure you include the "SSL and Encryption" lib in the standalone. This is done in the "Inclusions" pane.
I will update the bug report.
Kind regards,
Panos
--
Re: widget Browser not opening URL with picture
Posted: Tue Nov 27, 2018 10:29 am
by LiveCode_Panos
Hmm I just tested and I can successfully load the image (i.e. the https URL) in the browser widget, either with or without the "SSL and Encryption" library.
What does the browser widget display for you when the image does not load?
Kind regards,
Panos
--