JavaScript debugging in Internet Explorer (all scripts on page) -
I am new to a project in a mature stage. There are several JS scripts and libraries on one of the pages, jQuery is used intensely. There is a strange error in IE 7/8 only: In the middle of the execution of page scripts, the object of jQuery is undefined, so everything else stops working.
Two scripts have been specified in the middle of HTML, say, like this:
script1 , there is an object which is expected in jQuery , but at the beginning of script 2 < / Code> variable jQuery is already undefined. Please consider any idea where to debug and how to do it!
Does the control of the execution of script execution and WHOLE result include JS (including debug) all the JS on one page?
Thank you! :)
UPDATE I have created a patch: script1 at the end of backup: var jQueryBackup = JQuery; I'm restoring it at the beginning of script2 : if (! JQuery & jQuery backup) jQuery = JQueryBackup; This script works, but it does not explain how a variable between the two scripts can be undefined (I see it literally between two codes).
Your & lt; Script & gt; In the middle of HTML? Give them & lt; Head & gt; & lt; Head & gt; & Lt; Script src = "script1.js" & gt; & Lt; / Script & gt; & Lt; Script src = "script2.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt;
Comments
Post a Comment