Hello,
I have a menu that when a user clicks an item it postback using the RadAjaxPanel.
Well in certain items i need to cancel the ajax request for like the 'DOWNLOAD FILE' item but leave it on for other items.
Im using the Panels onRequestStart but all it returns in the eventtarget is my menu ID is there anyway to find the ITEM within the menu that triggered the AJAX?
Or should i make a custom menu items with buttons?
CODE:
I have a menu that when a user clicks an item it postback using the RadAjaxPanel.
Well in certain items i need to cancel the ajax request for like the 'DOWNLOAD FILE' item but leave it on for other items.
Im using the Panels onRequestStart but all it returns in the eventtarget is my menu ID is there anyway to find the ITEM within the menu that triggered the AJAX?
Or should i make a custom menu items with buttons?
CODE:
<script type=
"text/javascript"
>
function
onRequestStart(sender, args) {
if
(args.get_eventTarget().indexOf(
"ExportToExcelButton"
) >= 0 ||
args.get_eventTarget().indexOf(
"ExportToWordButton"
) >= 0 ||
args.get_eventTarget().indexOf(
"ExportToCsvButton"
) >= 0 ||
args.get_eventTarget().indexOf(
"ExportToPdfButton"
) >= 0) {
args.set_enableAjax(
false
);
}
if
(args.get_eventTarget().indexOf(
"FilesMenu"
) >= 0)
{
alert(
"ET: "
+ args.get_eventTarget());
alert(
"EA: "
+ args.get_eventArgument());
alert(
"ETE ID: "
+args.get_eventTargetElement().id);
args.set_enableAjax(
false
);
}
}
</script>