• 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: Safari: When do changes to a <textarea> show up in AppleScript "get the text..."
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari: When do changes to a <textarea> show up in AppleScript "get the text..."


  • Subject: Re: Safari: When do changes to a <textarea> show up in AppleScript "get the text..."
  • From: Roger Howard <email@hidden>
  • Date: Tue, 20 Oct 2009 15:23:13 -0700


On Oct 20, 2009, at 3:19 PM, Mark J. Reed wrote:

Or if the textarea has an id="someid" attribute, Yup, that's what I
had in mind when I said you'd have to use JavaScript.

A couple alternatives for finding the textarea from JavaScript.
First, if it has an id="someid" attribute, this will work no matter
where it is:

"document.getElementById('someid').value"

Second, if it's the only textarea on the page:

"document.getElementsByTagName('textarea')[0].value"

Or if you're using Jquery on that page, which I greatly prefer,

$("#someid").val();

Cheers!
_______________________________________________
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: 
 >Safari: When do changes to a <textarea> show up in AppleScript "get the text..." (From: email@hidden)
 >Re: Safari: When do changes to a <textarea> show up in AppleScript "get the text..." (From: "Mark J. Reed" <email@hidden>)
 >Re: Safari: When do changes to a <textarea> show up in AppleScript "get the text..." (From: Roger Howard <email@hidden>)
 >Re: Safari: When do changes to a <textarea> show up in AppleScript "get the text..." (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Safari: When do changes to a <textarea> show up in AppleScript "get the text..."
  • Next by Date: AS Bug?
  • Previous by thread: Re: Safari: When do changes to a <textarea> show up in AppleScript "get the text..."
  • Next by thread: AS Bug?
  • Index(es):
    • Date
    • Thread