Hi,
I am using restapi to upload files its working file if I call method directly like below
working fine
<button type="button" class="btn btn-primary" onclick="uploaddossier(false);">
Save as Draft
</button>
Problem:
if I call "uploaddossier()" within function like below
<button type="button" class="btn btn-primary" onclick="IssendApproval();">
Send For Approval
</button>
function IssendApproval() {
// if ($('#chkwfstatus').is(':checked')) {
// if (window.confirm('Do you want to send for approval now then press "ok" ,if yuou want to send later then press cancel.?')) {
// if (window.confirm('Are you sure to sent for approval.?')) {
// if (window.confirm('Do you want to send for approval now then press "ok" ,if yuou want to send later then press cancel.?')) {
// if (window.confirm('Are you sure to sent for approval.?')) {
$('#hid_flagIssendforapproval').val('1');
if ($('#getFile').get(0).files.length > 0) {
uploaddossier(true);
}
clearui();
//}
return false;
if ($('#getFile').get(0).files.length > 0) {
uploaddossier(true);
}
clearui();
//}
return false;
//}
}
}
then its not working its showing below error
what to do get rid of this error.. as I mentioned if I call " uploaddossier(true); " ,directly not within function so it works fine
Kindly help
Thanks