Jump to content

Stock on radio button select.


Recommended Posts

Good afternoon,

 

I've been stuck on trying to select a radio button. Could anyone point me in to the right direction?

Here's the source HTML.

<input type="radio" name="status_target" value="1" checked>Any Order Status<br />
              <input type="radio" name="status_target" value="2">Assigned Order Status (select below)

I just want to select one radio button that says "Assigned Order Status (select below)

 

However

_IEFormElementRadioSelect(_IEGetObjByName($oIE, 'status_target'), '2', "status_target", 1, "byValue")

Doesn't work. Any ideas on where I am going wrong?

 

Thank you very much for your help everyone!

Link to comment
Share on other sites

Sorry disregard, I eventually came up with a solution. Here's what I drew up after hitting a wall for 3 hours. LOL

 

Func _clickbutton($_string, $_value)
$oButtons = _IEGetObjByName($oIE,$_string,-1)
For $oBtn In $oButtons
    If _IEFormElementGetValue($oBtn) = $_value Then
        _IEAction($oBtn, "focus")
        _IEAction($oBtn, "click")
        ExitLoop
    EndIf
 Next
 EndFunc
 _clickbutton("status_target", "2")
_clickbutton("filelayout", "2")
_clickbutton("product_details", "1")

 

Link to comment
Share on other sites

11 hours ago, Darkflame808 said:

I just want to select one radio button that says "Assigned Order Status (select below)

However

_IEFormElementRadioSelect(_IEGetObjByName($oIE, 'status_target'), '2', "status_target", 1, "byValue")

Doesn't work. Any ideas on where I am going wrong?

The first parameter of _IEFormElementRadioSelect is supposed to be an object reference to the desired form.

Link to comment
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
 Share

  • Recently Browsing   0 members

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