Forum Moderators: open
// get all work order items.
for(i = 0; i < response.records; i++){
row = response.rows[i]; // row is cell array shortcut.
var id = row["cell"]["0"];
// construct and display all category sales lines.
$('#sa-table-2 tbody').append('<tr id="'+id+'"><td><select name="wi-PLID" class="wi-PLID"></select></td></tr>');
$('tr#'+id+' select[name="wi-PLID"]').load('php/wo-pricelist-se-script.php?wo.SVID='+SVID, data, function(data){$('tr#'+id+' select[name="wi-PLID"]').html(data.replace('option value="'+row['cell']['3']+'"', 'option selected="selected" value="'+row['cell']['3']+'"'));});
// alert('x');
}
$('tr#'+id+' select[name="wi-PLID"]').load('php/wo-pricelist-se-script.php?wo.SVID='+SVID, data, function(data){$('tr#'+id+' select[name="wi-PLID"]').html(data.replace('option value="'+row['cell']['3']+'"', 'option selected="selected" value="'+row['cell']['3']+'"'));});
$('tr#'+id+' select[name="wi-PLID"]').load('php/wo-pricelist-se-script.php?wo.SVID='+SVID, data, function(data){$(this).html(data.replace('option value="'+row['cell']['3']+'"', 'option selected="selected" value="'+row['cell']['3']+'"'));});
function(data){
$(this).html(data.replace('option value="' +
row['cell']['3'] + '"',
'option selected="selected" value="' +
row['cell']['3'] + '"'));
}
var id = row["cell"]["0"],
cell3 = row["cell"]["3"];
$('tr#'+id+' select[name="wi-PLID"]').load('php/wo-pricelist-se-script.php?wo.SVID='+SVID, data, function(data){$(this).html(data.replace('option value="'+cell3+'"', 'option selected="selected" value="'+cell3+'"'));});
function dynamicCallback(cell3) {
return (function (data) {
$(this).html(data.replace('option value="'+cell3+'"', 'option selected="selected" value="'+cell3+'"'));
});
}
$('tr#'+id+' select[name="wi-PLID"]').load('php/wo-pricelist-se-script.php?wo.SVID='+SVID, data, dynamicCallback(cell3));