Ok, I\'m doing a bunch of RIA/AJAX stuff and need to create a \"pretty\", custom confirm box which is a DIV (not the built-in javascript confirm). I\'m having trouble determ
In my case, the goal was to display a customConfirm
box whenever user clicks the delete link embedded within each row of a .Net Repeater
Whenever user clicks the delete link of any particular row,the Custom Confirm function is called. Now inside the confirm function, in addition to rendering the new box, the following 2 things needed to be done:
// obtain the element(we will call it targetObject) that triggered the event
targetObject = (event.target==undefined ? event.srcElement : event.target);
// include a call to _doPostBack in the onclick event of OK/YES button ONLY
(targetObject.href!=undefined){ eval(targetObject.href); } else{ _doPostBack(targetObject.name,''); // it is assumed that name is available
The above if/else construct pertains to my case. Main thing is to just know that you can simulate the confirm pause & continuity using the event object and __doPostBack
function.