Executing javascript in Safari via AppleScript...
Executing javascript in Safari via AppleScript...
- Subject: Executing javascript in Safari via AppleScript...
- From: David Crowe <email@hidden>
- Date: Sun, 21 Nov 2004 22:59:19 -0700
Title: Executing javascript in Safari via
AppleScript...
There's probably a really simple explanation for this...
I'm trying to execute some _javascript_ from an applescript, and
I'm able to view elements of the page from the "do _javascript_"
applescript command in Safari (and from entering the code with a
"_javascript_:" prefix as a pseudo-URL) but I cannot modify
any elements.
For example:
do _javascript_
"alert(document.frmQueryBox.SendTo.value)" in document
1
displays the value (i.e. name) showing in a pull-down menu.
However
do _javascript_
"document.frmQuery.Box.SendTo.value = 'New Value'" in
document 1
does nothing. But if I build similar _javascript_ into a web page
it works.
Is there some kind of prohibition in browsers from having
external _javascript_ modify the page?
- David Crowe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden