Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Javascript Only Runs When TabContainer is Set to OnDemand="False"

$
0
0

ASP.Net 4.5.  Visual Studio 2012.  IE 11.  Latest (final Ajax Toolkit release).

I have javascripting that ensures that ListBox controls return to the selected item upon page refresh (instead of scrolling back to the top of the list).  I have placed this code right at the end of the <ContentTemplate> section of a TabPanel (as seen below).  This code runs only if the TabControl is set to OnDemand="False."  I placed an alert('Got here'); at the top of the code to test.  The alert does NOT fire when OnDemand="True."  I want to use OnDemand="True."  Can anyone help me figure out what is needed to make this work?  Thanks for the help.

<script type="text/javascript">
                    try {
                        var e = document.getElementById("<%= SelectedChaplains.ClientID %>");
                        e.options[e.selectedIndex].selected = true;
                    }
                    catch (Error) {
                    }
                    try {
                        var e = document.getElementById("<%= RDSelection.ClientID %>");
                        e.options[e.selectedIndex].selected = true;
                    }
                    catch (Error) {
                    }
                    try {
                        var e = document.getElementById("<%= SelectedJurisdictions.ClientID %>");
                 e.options[e.selectedIndex].selected = true;
                    }
                    catch (Error) {
                    }</script></ContentTemplate></cc1:TabPanel>


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>