ScriptResource.axd error when navigating away from page

7 posts, 0 answers
  1. Karl
    Karl avatar
    172 posts
    Member since:
    Sep 2010

    Posted 20 Jan 2011 Link to this post

    I have a couple of pages on my site that dynamically add RadPanelItems to a RadPanelBar and apply header and content templates to them. I have recently noticed that when I navigate away from these pages when the site is debugging, I get a ScriptResource.asxd?d=LotsOfNumbersAnNdLetters..... error that reads like so...

    Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.

    I can only assume this has something to do with the Templates that get applied, but cant work out whats wrong as the pages work exactly as they're meant to and don't produce any server or client side errors until this one. Again, this error ONLY occurs when navigating away from the page, not on postback.

    The templates do have event handlers added to controls that are built in the templates and think it might have something to do with these, but when I comment these handlers and methods out, I still get the same error...

    It's very puzzling and I have to get it fixed but have run out of ideas.
  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 25 Jan 2011 Link to this post

    Hello Karl,

    Could you, please, try to isolate the problem in a single page (as small amount of code as possible) that will continue to reproduce it.
    There is a big chance you will be able to resolve the problem on your own during the process, but even if you are not able to you can post the page and we will try to help you out.


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Karl
    Karl avatar
    172 posts
    Member since:
    Sep 2010

    Posted 25 Jan 2011 Link to this post

    Hi Nikolay,

    Bad news I'm afraid.

    I've taken out huge chunks of code and put all the relevant code required to build the page so it functions as I need into one aspx page with a code behind and I'm still getting the same issue. The page loads exactly as I want it to, but when I navigate away from it, even to a completely different site, such as Google, it generates the ScriptResource error.

    How do I go about sending the files to you so someone there can see either what I'm doing wrong, or where the issue lies? I cant attach them here as I'm only allowed to attach gif, jpg, jpeg and png files.

    Thanks
  5. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 28 Jan 2011 Link to this post

    Hello Karl,

    If upload is required, then you need to open a support ticket (only there you can upload an attachment to your post).


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. Karl
    Karl avatar
    172 posts
    Member since:
    Sep 2010

    Posted 02 Feb 2011 Link to this post

    This was an issue caused by the 2010.3.1215 dll which was fixed when I referenced the 2010.3.1317 dll instead.
  7. Chandan Dey
    Chandan Dey avatar
    50 posts
    Member since:
    Aug 2012

    Posted 23 May 2011 Link to this post

    Hi,
    I am using Telerik.Web.UI.dll (Version - 2010.3.1317.40) and working with RadSplitter, RadSplitBar.
    When I resize the RadSplitBar sometime (not everytime) an error occued 
    Error : Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.

    In file ScriptResource.axd & method :
    $type._removeHandler = function DomEvent$_removeHandler(elements, eventName, handler) {
        Sys.query(elements).each(function() {
            var nodeType = this.nodeType;
            if (nodeType === 3 || nodeType === 2 || nodeType === 8) return;
            Sys.UI.DomEvent._ensureDomNode(this);
            var browserHandler = null;
            if ((typeof(this._events) !== 'object') || !this._events) throw Error.invalidOperation(Sys.Res.eventHandlerInvalid);
            var cache = this._events[eventName];
            if (!(cache instanceof Array)) throw Error.invalidOperation(Sys.Res.eventHandlerInvalid);
            for (var i = 0, l = cache.length; i < l; i++) {
                if (cache[i].handler === handler) {
                    browserHandler = cache[i].browserHandler;
                    break;
                }
            }
            if (typeof(browserHandler) !== 'function') throw Error.invalidOperation(Sys.Res.eventHandlerInvalid);
            if (this.removeEventListener) {
                this.removeEventListener(eventName, browserHandler, false);
            }
            else if (this.detachEvent) {
                this.detachEvent('on' + eventName, browserHandler);
            }
            cache.splice(i, 1);
        });
    }

    Please help me asap.

    Thanks,
    Chandan
  8. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 26 May 2011 Link to this post

    Hi Chandan,

    We are aware of an bug in RadSplitter which was causing such error in previous versions of the control which is already fixed. Could you try to upgrade to the latest version of RadControls for ASP.NET AJAX (currently Q1 2011 SP2) and see if the problem still occurs?

    If upgrading does not fix the issue, could you please provide a sample project reproducing the problem so we can investigate it further?

    Regards,
    Dobromir
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017