Re: Browser selections

2019-09-12 Thread hh via use-livecode
Perhaps you wish to select the text (not getting the selected text what is more difficult) of a textarea with id='j1" then you can do: on mouseUp put 10 into selStart; put 20 into selEnd do "document.getElementById('j1')." & \ "setSelectionRange("& selStart,selEnd &");" in widget

Re: Browser selections

2019-09-12 Thread J. Landman Gay via use-livecode
On 9/12/19 5:01 PM, hh via use-livecode wrote: JLG wrote: Is there a way select text by script in a browser widget? I thought I'd done that before but I don't see a command for it now. You certainly didn't that without javascript. Here is a demostack that shows how to do that, only a few

Re: Browser selections

2019-09-12 Thread hh via use-livecode
> JLG wrote: > Is there a way select text by script in a browser widget? I thought I'd > done that before but I don't see a command for it now. You certainly didn't that without javascript. Here is a demostack that shows how to do that, only a few lines are needed for using a

Browser selections

2019-09-12 Thread J. Landman Gay via use-livecode
Is there a way select text by script in a browser widget? I thought I'd done that before but I don't see a command for it now. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com

Re: Browser selections

2019-04-10 Thread JJS via use-livecode
You're welcome! You helped me so often on the forum :) Op 10-4-2019 om 19:56 schreef J. Landman Gay via use-livecode: Thanks for the details. It doesn't do what I need but it could come in handy in the future. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software |

Re: Browser selections

2019-04-10 Thread J. Landman Gay via use-livecode
Thanks for the details. It doesn't do what I need but it could come in handy in the future. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On April 10, 2019 12:46:12 PM JJS via use-livecode wrote: Jacque, what i do is echo only a

Re: Browser selections

2019-04-10 Thread JJS via use-livecode
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

Re: Browser selections

2019-04-10 Thread 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

Re: Browser selections

2019-04-09 Thread JJS via use-livecode
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

Re: Browser selections

2019-04-08 Thread 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:

Re: Browser selections

2019-04-08 Thread J. Landman Gay via use-livecode
Thanks. I don't know JavaScript so it's a little over my head, but I'll try it. On 4/8/19 6:22 AM, hh via use-livecode wrote: (Getting the selection of a browser widget: Aee my previous post). Setting the selection of a browser widget: Assume you have an element click me in your webpage.

Re: Browser selections

2019-04-08 Thread JJS via use-livecode
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

Re: Browser selections

2019-04-08 Thread hh via use-livecode
(Getting the selection of a browser widget: Aee my previous post). Setting the selection of a browser widget: Assume you have an element click me in your webpage. Then the following selects char 1 to 4 of the link text (= "clic"). on mouseUp put "var node =

Re: Browser selections

2019-04-08 Thread hh via use-livecode
> Is there a way to get/set selected text in a browser widget? > I couldn't find anything. Why is the LC Builder forum not among your search places? With LC Script: No. With JavaScript. Yes. http://forums.livecode.com/viewtopic.php?p=174936#p174936

Browser selections

2019-04-07 Thread J. Landman Gay via use-livecode
Is there a way to get/set selected text in a browser widget? I couldn't find anything. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list