Re: Executing javascript in Safari via AppleScript...
Re: Executing javascript in Safari via AppleScript...
- Subject: Re: Executing javascript in Safari via AppleScript...
- From: jj <email@hidden>
- Date: Mon, 22 Nov 2004 09:23:25 +0100
> 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?
To select an option in a pulldown menu, you need "selectedIndex" (not
"value").
jj
--
http://www.macscripter.net/
http://www.osaxen.com/
_______________________________________________
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