var
button = $(
"input[id$=SaveItem]"
);
button.removeAttr(
"onclick"
);
button.click(
function
() {
var
elementName = $(
this
).attr(
"name"
);
var
aspForm = $(
"form[name=aspnetForm]"
);
var
oldPostbackUrl = aspForm.get(0).action;
var
currentSourceValue = GetUrlKeyValue(
"Source"
,
true
, oldPostbackUrl);
var
newPostbackUrl = oldPostbackUrl.replace(currentSourceValue,
"MyRedirectionDestination.aspx"
);
if
(!PreSaveItem())
return
false
;
WebForm_DoPostBackWithOptions(
new
WebForm_PostBackOptions(elementName,
""
,
true
,
""
, newPostbackUrl,
false
,
true
));
});
No comments:
Post a Comment