Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

Select Dropdown value dynamically

DaltonDalton Members
edited August 2013 in Sahi - Open Source
Hi all,
I have a drop down which populates credit cards automatically when i added a credit card and hit refresh button,. I may have a zero,one or more credit cards at the time of adding new card
But i want to choose a card which is added (eighter first or last)

I used the below code


but not working properly

Any alternative for this???????

Best Answer

  • you can use collect() api to collect all the values in the drop down into an array, so that you can select which ever value you want from the DropDown.

    eg:var $els = _collect ("_link", "/group 1/", _in(_div("div1")));
    you can also use count to count all the values from the dropdown using count() api
    var $c = _count ("_link", "/group 1/");
Sign In or Register to comment.