i have a TreeView that once the user drops the item to the desired position, it displays a dialog box and asks for confirmation, if the user selects cancel, how would i also cancel the placement of the item so it goes back to its original position? my current code is below but isnt working:
var
newDiv = $(document.createElement(
'div'
));
newDiv.html(
'<p><span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>Are you sure you want to move the item: '
+ title +
' </p>'
);
newDiv.dialog( {
autoOpen:
true
,
width: 600,
buttons: {
"Save"
:
function
() {
$(
this
).dialog(
"close"
);
},
"Cancel"
:
function
() {
$(
this
).dialog(
"close"
);
e.setValid =
false
;
}
}
});