Browser selections

JJS jjs at krutt.org
Wed Apr 10 13:44:22 EDT 2019


Jacque,


what i do is echo only a single line as a webpage. The php file is only 
called by the API, because i send it with the data to the api as a 
return address.

There is no hilited text.

Before this php file would contain the URL scheme and reopen the app to 
continue where it was, but now i do this:

in the php file:

<?php
echo"return to mysuperdeluxeapp"
/* in stead of --> header ("Location:mysuperdeluxeapp://"); */
?>

then in LC in widget script i do:


*on*browserDocumentLoadComplete pUrl

*local*tT

*put*thehtmlTextofwidget"awesomebrowser"intotT

*repeat* for5times

*if* tT contains"return to mysuperdeluxeapp"*then*

*set*theurlofwidget"awesomebrowser"toempty

*go*tocard"letsgoon"

*exit* *repeat*

*end* *if*

*end* *repeat*

*end*browserDocumentLoadComplete


Op 10-4-2019 om 08:44 schreef J. Landman Gay via use-livecode:
> I was replying to you, JJS. I might be confused about how your method 
> works. How does returning a line from the server allow hiliting text 
> in the widget?
>
> On 4/9/19 12:33 PM, JJS via use-livecode wrote:
>> Who are you referring to Jacque? hh or me?
>>
>>
>> If it's me, then:
>>
>> i echo only one line of text with the php file which is called after 
>> the api routine succeeded.
>>
>> this way i can just look for that one sentence, it goes so fast you 
>> can't see it and the app switches to another card
>>
>>
>> Op 8-4-2019 om 20:52 schreef J. Landman Gay via use-livecode:
>>> Actually, I need to hilite a portion of the text in the browser 
>>> rather than just get the whole content. Are you doing that?
>>>
>>> Eventually I may need to get the user's drag-selection too, but not 
>>> yet.
>>>
>>>
>>> On 4/8/19 12:22 PM, JJS via use-livecode wrote:
>>>> you can use this:
>>>>
>>>> *put*thehtmlTextofwidget"browser"intotT
>>>>
>>>>
>>>> i use this now for an api which redirects to a php file which 
>>>> echoes a line of text (as normally it would use the URL scheme, but 
>>>> this does not work with the widget)
>>>>
>>>> this way i could use the  browser widget and stay in the 
>>>> app(mobile) instead of using a external browser and retunring to 
>>>> the app afterwards which is an ugly thing and leaves the url open 
>>>> in an extenal browser.
>>>>
>>>> if the text in the browser is my text then it moves on(and i'm 
>>>> checking like 10 times)
>>>>
>>>> It works great!
>>>>
>>>>
>>>> Op 7-4-2019 om 21:34 schreef J. Landman Gay via use-livecode:
>>>>> Is there a way to get/set selected text in a browser widget? I 
>>>>> couldn't find anything.
>>>>>
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>




More information about the Use-livecode mailing list