1

How can I loop over the select tag options base on the selected row. Please see my screenshot

enter image description here

Once the user click the update button I need to loop over the the 3 select tags options that are located on the selected row. I have this code already dealing with select event.

$('select.selectedsystem').on('change', function () {
        var selectedText = $(this).val();
        var user = $(this).parents('td').prev().text();
        var syslvl = $(this).parents('td').next();
        var sysbranch = $(this).parents('td').nextAll().eq(1);
        var sysunit = $(this).parents('td').nextAll().eq(2)
        syslvl.text("Retrieving...");
        sysbranch.text("Retrieving...");
        sysunit.text("Retrieving...");

    }).change();
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

0

If it is a form, then you can loop through the form elements using each loop and the form id.

See the code below

$("#form :select").each(function(){
        // Your stuff
});
bigbounty
  • 16,526
  • 5
  • 37
  • 65