Web page fields

Mike Bonner bonnmike at gmail.com
Thu Mar 5 15:58:06 EST 2015


This works..
I have this in a hidden field: document.getElementById("query
<>").value='the text to search for here';
And do this..
get revbrowserexecutescript(sBrowserId,field 1)
and have a browser instance with your form example loaded. It successfully
places "the text to search here" in the box with id "query"
Tested with both the old browser, and cef on windows 7.

I noticed while doing this, i'm getting a render error (debug.log) when
using cef.  LC 7.0.1

On Thu, Mar 5, 2015 at 1:26 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> Ah k. I should have read better. You want to fill in the slots, not just
> jump to the results.
> The javascript would be something like
> document.quick_search_form.query.value='the text to search for here'
>
> Since it sounds like you're using the LC browser object, you can probably
> build the string as above and use:
>  get revbrowsersexecutescript(sBrowserInstanceId,tQuery)
>
> Just now got home, so I haven't had a chance to try it out to determine
> the exact method, but that should get you close.
>
> On Thu, Mar 5, 2015 at 11:14 AM, Bill Vlahos <bvlahos at mac.com> wrote:
>
>> Firebug shows:
>>
>> GET https://company.batchbook.com/search/autocomplete?query=NameToSearch
>> <https://company.batchbook.com/search/autocomplete?query=NameToSearch>
>>
>> When I enter the URL as
>> https://company.batchbook.com/search/autocomplete?query=NameToSearch <
>> https://company.batchbook.com/search/autocomplete?query=NameToSearch>
>> into the browser it executes the command and shows the results as a CSV
>> list on a blank page instead of mimicking what happens when the user types
>> or pastes into the field. When the user types or pastes into the field the
>> web page UI overlays the found entries.
>>
>>
>> The page source shows this as the form:
>>       <div id="global-search-wrapper <>">
>>         <form id='quick_search_form <>'
>> ng-controller='QuicksearchController <>'>
>>   <input bb-autocomplete="true <>" id="query <>" name="query <>"
>> on-select="navigateTo(id) <>" placeholder="Search... <>" type="text <>"
>> value=" <>" />
>> </form>
>>
>>       </div>
>>
>> Bill Vlahos
>>
>> > On Mar 4, 2015, at 3:07 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>> >
>> > If the page isn't too complicated and you can figure out how things are
>> > being sent.. (easy if the page works with GET requests.. just look at
>> how
>> > it structures the url, and build your own with your query in place of
>> your
>> > experimental query) If its a post, you might be able to figure out what
>> is
>> > being sent, and post directly to the page that handles things, but some
>> > pages seem to purposely obfuscate things so its hard to tell.
>> > I think you can use firebug to look at how things are sent too, which
>> might
>> > be an end run around deciphering page source.
>> >
>> > An example of a get URL, simplest method for google...  :
>> > https://www.google.com/search?q=bill+vlahos  Replace the stuff after =
>> with
>> > your url encoded search string.
>> >
>> > A post is, like I said, can be harder to determine depending on how
>> > complicated the page is.
>> >
>> >
>> > On Wed, Mar 4, 2015 at 3:53 PM, Bill Vlahos <bvlahos at mac.com> wrote:
>> >
>> >> This isn’t a LiveCode question specifically.
>> >>
>> >> Let’s say there is a web page and it has a search field on it.
>> >>
>> >> Can I make a URL that puts text into the field? In this case I don’t
>> even
>> >> need to press return as the search field will search automatically when
>> >> typing text in the field. This particular web page does NOT
>> automatically
>> >> put the cursor in the search field.
>> >>
>> >> I’m guessing it is a javascript that does this.
>> >>
>> >> Thanks,
>> >> Bill Vlahos
>> >>
>> >>
>> >> _______________________________________________
>> >> 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
>>
>> _______________________________________________
>> 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