Jump to content
dannytaki

Clicking an OnClick javascript button with no name or ID

Recommended Posts

dannytaki

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

 

Share this post


Link to post
Share on other sites
sammy1983

Any help please...

Share this post


Link to post
Share on other sites
Juvigy

Instead of 'SPAN' - search for 'input'. Then identify the correct element by the image source:

https://images-na.ssl-images-amazon.com/images/G/01/abis-ui/buttons/go._V187564664_.gif

Share this post


Link to post
Share on other sites

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

×