I'm messing with a script to select a form based off a "select" button, except the webpage could have several identical "select" buttons, and I need to always choose the last one. Here is the page source data for a webpage with 4 submit buttons, all named the same:
And here is my javascript written in AS to try and get it.
I'm wondering if there is a way to title each submit button 0,1,2... then another command to select the last one? I'm a bit stuck on this one. Thanks!
And here is my javascript written in AS to try and get it.
Code:
tell application "Safari"
do JavaScript "document.forms[contactform].submit();" in document 1
end tell
I'm wondering if there is a way to title each submit button 0,1,2... then another command to select the last one? I'm a bit stuck on this one. Thanks!