I am attempting to confirm a delete request and pass a jsp variable to the confirm delete function and then to the actual function that performs the delete request.
The confirm works fine, the jsp variable is passed to the confirm delete function, but my actual delete function now fails.
Can anyone spot the error or why?
<input type="image" src="./images/btn_delete.gif" onClick="return confirmDelete('<%= section.getId()%>');">
// Confirm Delete Request
function confirmDelete(iSection) {
var yes=confirm('Are you sure you wish to delete ' + iSection + '?');
if (yes) {
return onDeleteSection('iSection');
}
else {
return false;
}
}
// Delete Section
function onDeleteSection(strSectionId){
document.sectionForm.Cmd.value = "DeleteSection";
document.sectionForm.SectionID.value = strSectionId;
document.sectionForm.submit();
}
The confirm works fine, the jsp variable is passed to the confirm delete function, but my actual delete function now fails.
Can anyone spot the error or why?
<input type="image" src="./images/btn_delete.gif" onClick="return confirmDelete('<%= section.getId()%>');">
// Confirm Delete Request
function confirmDelete(iSection) {
var yes=confirm('Are you sure you wish to delete ' + iSection + '?');
if (yes) {
return onDeleteSection('iSection');
}
else {
return false;
}
}
// Delete Section
function onDeleteSection(strSectionId){
document.sectionForm.Cmd.value = "DeleteSection";
document.sectionForm.SectionID.value = strSectionId;
document.sectionForm.submit();
}