Jump to content

Clicking an OnClick javascript button with no name or ID


Recommended Posts

Trying to script a button click that looks like this:

 

<span class="action-go" onclick="MYO.JS.handle_action($(this).parent().find('.action option:selected').attr('value'),&#10;     $(this).parent().find('.action option:selected').attr('url'));">
          <input width="21" height="21" align="absmiddle" type="image" src="https://images-na.ssl-images-amazon.com/images/G/01/abis-ui/buttons/go._V187564664_.gif" border="0">
        </span>

<input width="21" height="21" align="absmiddle" type="image" src="https://images-na.ssl-images-amazon.com/images/G/01/abis-ui/buttons/go._V187564664_.gif" border="0">

This is what I tried:
 

Func GetButtons()
    Local $oBtns = _IETagNameGetCollection($g_oIE, "span")
    For $oBtn In $oBtns
        If String($oBtn.classname) = "action-go" Then
            _IEAction($oBtn, "click")
        EndIf
        ExitLoop
Next
EndFunc

 

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...