• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Google Chrome: Set variable to result of JavaScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Google Chrome: Set variable to result of JavaScript


  • Subject: Re: Google Chrome: Set variable to result of JavaScript
  • From: julifos <email@hidden>
  • Date: Thu, 14 Jul 2011 09:45:20 +0200
  • Thread-topic: Google Chrome: Set variable to result of JavaScript

It was just sample code for the pageloaded event and yes, it was supossed
to enter "loaded!" in the search field, which does in my system under the
same conditions of name="q" and not id="q" ;-)


jj


El 13/07/11 23:17, "Bruce Robertson" <email@hidden> escribió:

>There is no text field on the google page with an ID of "q".
>
>The search field has a NAME of "q".
>
>The script seems to work in the sense that it knows when the page is
>loaded.
>
>But what exactly is supposed to happen with this script as originally
>written?
>
>My impression is that it is supposed to display "loaded!" in the search
>field of the page.
>
>Doesn't happen.
>
>Bruce Robertson
>
>
>On Jul 13, 2011, at 11:33 AM, julifos wrote:
>
>>What if you use a "display dialog" instead of the callJavaScript? Maybe
>>your Google config doesn't include a "q" textfield...
>>This works for me in Smile 3.5.3 build 617:
>>make new web window with properties ¬
>>   {path name:"http://www.google.com/";, script:foo}
>>script foo
>>   on pageloaded w
>>       display dialog "Loaded" with icon 1      callJavaScript w script ¬
>>         "document.getElementById('q').value='loaded!'"
>>   end pageloaded
>>end script
>>jj
>>El 13/07/11 17:19, "Bruce Robertson" <email@hidden> escribió:
>>>Doesn't seem to do anything.
>>>(After fixing breaks caused by email).
>>>Bruce Robertson
>>>On Jul 13, 2011, at 12:42 AM, julifos wrote:
>>>>Like this (for future reference ;-):
>>>>########
>>>>make new web window with properties {path
>>>>name:"http://www.google.com/";,
>>>>script:foo}
>>>>script foo
>>>>on pageloaded w
>>>>callJavaScript w script "document.getElementById('q').value='done
>>>>loading!'"
>>>>end pageloaded
>>>>end script
>>>>########
>>>>jj
>>>>El 13/07/11 01:30, "Emmanuel LEVY" <email@hidden> escribió:
>>>>>For those interested, Smile's web window receives a "pageloaded" event
>>>>>when the page is safe.
>>>>>Emmanuel
>
>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Google Chrome: Set variable to result of JavaScript
      • From: Christopher Stone <email@hidden>
References: 
 >Re: Google Chrome: Set variable to result of JavaScript (From: Bruce Robertson <email@hidden>)

  • Prev by Date: "Shared Folder Bar"
  • Next by Date: Determine media type in iTunes
  • Previous by thread: Re: Google Chrome: Set variable to result of JavaScript
  • Next by thread: Re: Google Chrome: Set variable to result of JavaScript
  • Index(es):
    • Date
    • Thread