开发者

jquery ajax tabs error on refresh or postback

开发者 https://www.devze.com 2023-03-08 10:47 出处:网络
I\'m implementing jquery tabs in a current project, and wanting to load one aspx page via the ajax load ability that contains a user control inside an updatepanel.The page I\'m calling uses the querys

I'm implementing jquery tabs in a current project, and wanting to load one aspx page via the ajax load ability that contains a user control inside an updatepanel. The page I'm calling uses the querystring to determine its content depending on the tab clicked. On loading the document. ready function in the ajax loaded page has a settimeout function that causes a __dopostback on the updatepanel to refresh the data.

The pages will load fine, but the settimeout function (with or without the __dopostback) causes an Unknown runtime error on line - updatePanelElement.innerHTML = rendering; , attempting to refresh the page causes a Sys.ArgumentTypeException: Object of type 'Sys._Application' cannot be converted to type 'Sys._Application' error. Depending on how many tabs you've switched between - this error will then be presented the same amount of times, I've seen some comments it may be a garbage collection issue?? Other errors via firebug are: Sys.Observable is null, clearEventsHandler is null.

The page I'm loading has all the jquery libraries, a scriptmanager and one plugin named shadowbox. removing the plugin doesn't affect it. either does changing the scriptmode on the scriptmanager. I'm using jquery ui 1.8.11 and jquery core 1.5.

My tabs setup looks like this (without the uls etc)

        <li><a href="/pmcbedman/Pages/RoomHolder.aspx?ward=2"><span>Ward 2</span></a></li>
        <li><a href="/pmcbedman/Pages/RoomHolder.aspx?ward=3"><span>Ward 3</span></a></li>
        <li><a href="/pmcbedman/Pages/RoomHolder.aspx?ward=7">Ward 7</a></li>
        <li><a href="/pmcbedman/Pages/RoomHolder.aspx?ward=9">Ward 9</a></li>
        <li><a href="/pmcbedman/Pages/RoomHolder.aspx?ward=ICU">开发者_运维百科ICU</a></li>

here's the tabs call done from the masterpage:

        $(function () {

        $("#tabs").tabs({ cache: false, ajaxOptions: { success: function () { }, cache: false, error: function (xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab"); } } });
        });

Haven't found anything on the web resembling this - at least not with a solution attached that's worked - has anyone got any ideas??


Are you referencing MicrosoftAjax.debug.js?

Try changing the reference to MicrosoftAjax.js if so. Also try changing the web.config to debug=false to see if that changes anything.

0

精彩评论

暂无评论...
验证码 换一张
取 消