What I am trying to accomplish is writing a javascript function that when called from the click of a page element does the tabbing and changing of the of the RadTabStrip and RadMultiPage, with the option of passing a query string. However, I would like the option of passing in another boolean parameter that will notify the "sending" tab the next time it is clicked, it needs to reload its content. I have had some success in changing the RadTabStrip and RadMultiPage from my script, as well as the using the query string by changing the ContentUrl of the "target" PageView, but have been experiencing a lot of trouble in figuring out how to get the "sending" tab to reload its PageView.
Current JS file:
Thank you in advance for assistance.
Current JS file:
function ToolClick(sender, args, queryString, targetPageIndex, refreshSendingPage) {
var revertContentUrl = false;
// get the multi page ID, and tab strip ID, from the SiteAuthenticated script
var multiPageID = top.GetMultiPageID();
var multiPage = top.$find(multiPageID);
var tabStripID = top.GetTabStripID();
var tabStrip = top.$find(tabStripID);
// get the target page view, and get its pre Tab Content URL for reverting after selection
var multiPageViews = multiPage.get_pageViews();
var targetPageView = multiPageViews._data[targetPageIndex];
var preTabPageContentUrl = targetPageView.get_contentUrl();
// change the page View's ContentUrl if the queryString was supplied
if (queryString != null && queryString.length > 0) {
targetPageView.set_contentUrl(preTabPageContentUrl + queryString);
revertContentUrl = true;
}
// if refreshSendingPage is true then set the tab we are leaving to PostBack on next click
if (refreshSendingPage) {
var currentTab = tabStrip.get_selectedTab();
currentTab.set_value("reload");
}
// do the tab change
tabStrip.get_tabs()._array[targetPageIndex].select();
// if we changed the contentUrl for the query then change it back
//if (revertContentUrl) {
// targetPageView.set_contentUrl(preTabPageContentUrl);
//}
}
// to be used in determining if the tab needs to postBack or not
function TabStrip_OnTabSelecting(sender, args) {
var selectingTab = args.get_tab();
// check tab values for post back
if (selectingTab.get_value() == "reload") {
// the tab is set to post back so unload and reload the related pageView
}
}
Thank you in advance for assistance.