Not able to select the item in the combo box
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2022
12:38 AM
08-08-2022
12:38 AM
Not able to select the item in the combo box
Hi,
I have one combo box, I am using this logic to select the item in the combo box.
value is the name of the combo box item.
Sometimes, the item gets selected. But other times only the first item is getting selected. What can be the possible;e reason for that?
for (var index=0;index<reqObj["wItemCount"];index++)
{
if(reqObj["Items"]["Item"](index)["Name"]==value)
reqObj["ClickItem"](index);
}
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2022
04:23 AM
08-08-2022
04:23 AM
I think your coding should look like this,
for (var index = 0; index < reqObj["wItemCount"]; index++)
{
if (reqObj["Items"]["Item"](index)["Name"] == value)
{
var objItem = reqObj["Items"]["Item"](index)["Name"];
objItem["ClickItem"]();
}
}
