Dependent Drop Downs

Joined
Nov 4, 2023
Messages
1
Reaction score
0
$(document).ready(function () {
var item = getBrand();
var item2 = getLot(Brand);
var item3 = getLocation();
});
function getBrand()
{
google.script.run.withSuccessHandler(
function (data) { //01
var Options="";
$.each(data, function(key, value) //02
{
Options = Options + '<option>' + value + '</option>'; //03
});
$(".brandname").append(Options); //04
}).getBrandList();
}



function getLot(Brand)
{
google.script.run.withSuccessHandler(
function (data) { //01
var Options="";
$.each(data, function(key, value) //02
{
Options = Options + '<option>' + value + '</option>'; //03
});
$(".basnonbas").empty().append('<option>-Select Lot-</option>');
$(".basnonbas").append(Options); //04
}).getLotList(Brand);
}
function getLocation(Lot)
{
google.script.run.withSuccessHandler(
function (data) { //01
var Options="";
$.each(data, function(key, value) //02
{
Options = Options + '<option>' + value + '</option>'; //03
});
$(".qualitydes").empty().append('<option>-Select Location-</option>');
$(".qualitydes").append(Options); //04
}).getLocationList(Lot);
}


</script>



<script>
function BtnAdd() {
var v = $("#TRow").clone().appendTo("#TBody");
$(v).find("input").val('');
$(v).find("th").first().html($('tr').length - 2);
}




Html Code is below :-


now the issue is this whenever I click on + button to add cloned row and after this changes any of the drop down values in an row then all other rows getting rest automatically while I am expecting that each cloned row should work independently with dependent drop downs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top