Currently, I have a toolbar that triggers a radconfirm window from an external JS file when a specific item is clicked. Upon clicking the OK button in the radconfirm window, it calls a callback function where I attempt to locate Button1 in order to execute its onclick event and subsequently delete a record from the database. Although traditionally this process can be achieved by embedding all scripts within the markup, my objective is to streamline the markup by transitioning everything into an external JS file.
The JavaScript functions involved are as follows:
function CallConfirm() {
var oConfirm = radconfirm("howdy", confirmCallbackFn, 500, 500);
}
function confirmCallbackFn(arg) {
if (arg == true) //the user clicked OK
{
document.getElementById("<%=Button1.ClientID%>").click();
}
else {
document.getElementById("rbtnRefesh").click();
}
}
I welcome any suggestions or input on how to improve this process, excluding recommendations such as "use ajax and a webmethod". As of now, I do not utilize webmethods nor do I implement the WebAPI; instead, I solely rely on a stored procedure.
Thank you.