• 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: Christopher Stone <email@hidden>
  • Date: Thu, 14 Jul 2011 15:45:19 -0500

On Jul 14, 2011, at 02:45, julifos wrote:
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" ;-)
______________________________________________________________________

Hey JJ,

It took me a couple of days to get to this, but with a minor modification it works every time on my machine:

make new web window with properties {path name:"http://www.google.com/", script:foo}

script foo
on pageloaded w
callJavaScript w script "document.getElementsByName('q')[0].value = '.Page Fully Loaded.'"
end pageloaded
end script

It's certainly neater than my ready-state handler for Safari.

--
Best Regards,
Chris

 _______________________________________________
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

References: 
 >Re: Google Chrome: Set variable to result of JavaScript (From: julifos <email@hidden>)

  • Prev by Date: Re: move a file to an external drive
  • Next by Date: Re: Indesign data merge
  • 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