Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
UltraWebTree v10.3 - update ig_webtree.js
posted

Taking a shot in the dark...I know this is an old, unsupported version and control but I am so close to getting this huge application working in Google Chrome I just have to give it a shot. So right now the app works fine in IE but some nodes do NOT trigger a load event in Google Chrome; I dug into the JS files and I think I have a fix but no matter what I change, nothing changes. So I think this version uses the web resources and therefore the scripts are compiled in the DLLs right? So that is a dead end. BUT is there a way to disable the web resources or just point the app or the control to a script directory or a new ig_webtree.js file? I hope so.

Can anyone help?

Parents
  • 16310
    Offline posted

    Hi Peter,

    You are right about it - scripts are compiled in the DLLs first, so you cant just replace the file.

    However, you can benefit from Javascript prototype chain and override the methods that you need to. Let's say you need to rewrite the function doSomething from the ig_webtree.js file and put it in a myFix.js file:

    function myFix() {
        $IG.WebDataTree.prototype.__doSomething = function () {
            // your code
        }
    }

    Then add your "patch" when the page loads, and call the function on body load event:

    <head runat="server">
        <script type="text/javascript" src="myFix.js"></script>
    </head>
    <body onload="myFix()">

    When the problematic functions are about to be called, the functions from your file will be executed, instead of the code in the ig_webtree.js, which cannot be modified otherwise.

    Please let me know if you have further questions on the matter, I will be glad to help.

     

Reply Children