I have a google script web app with input fields. I would like all of those fields is input required if user want to submit data. Therefore, I used \"required\" attribute and ca
I think these two functions should be separated:
function callEvent() {
var cellSelectedValue = $('#cellName').val();
google.script.run.withSuccessHandler(machineOption).machineNameByCell(cellSelectedValue);
var machineNameDropBoxhtml = '';
function machineOption(data) {
try {
for (var i = 0; i < data.machineNameArray.length; i++) {
machineNameDropBoxhtml += '';
}
$('#machineName').html(machineNameDropBoxhtml);
$('#machineName').formSelect();
} catch (error) {
alert(error);
}
}
}
Like this:
function callEvent() {
var cellSelectedValue = $('#cellName').val();
google.script.run
.withSuccessHandler(machineOption)
.machineNameByCell(cellSelectedValue);
var machineNameDropBoxhtml = '';
}
function machineOption(data) {
try {
for (var i = 0; i < data.machineNameArray.length; i++) {
machineNameDropBoxhtml += '';
}
$('#machineName').html(machineNameDropBoxhtml);
$('#machineName').formSelect();
} catch (error) {
alert(error);
}
}