2

I am trying to add jQuery to my IE 11 extension. When I run it, it gives me the error SCRIPT5007: Unable to get property _reference of undefined or null reference on the line E = jQuery.jstree._reference(o) I dont understand why though, because the same extension works in Chrome and Firefox? please help. I'd appreciate any help on the matter.

console.log("1");
var jq = document.createElement('script');
jq.src = "https://cdnjs.cloudflare.com/ajax/libs/jstree/3.2.1/jstree.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
console.log("2");

var jq2 = document.createElement('script');
jq2.src = "http://code.jquery.com/jquery-1.11.3.js";
document.getElementsByTagName('head')[0].appendChild(jq2);
console.log("3");


console.log("hi");
appAPI.resources.includeJS('js/angular.min.js');
console.log("passed!");
Irtza.QC
  • 1,026
  • 2
  • 10
  • 23
  • Where do you call jstree? What makes you think issue is relevant to your posted code? – A. Wolff Dec 07 '15 at 10:18
  • Ive added the complete code, and I do not call jstree anywhere. So its confusing. – Irtza.QC Dec 07 '15 at 10:27
  • 1
    That's funny because firstly you said you didn't use jstree and all your previous posted cde was all. Now you add relevant part showing than you are using/including jstree. What should we think, seriously? I don't want to be rude BUT if yiu ask question regarding specific issue, THEN post relevant code... And here, you are including jstree jQuery plugin **before** jQuery, you are lucky it works on other browsers, maybe because jQuery was cached or something... – A. Wolff Dec 07 '15 at 10:32
  • 1
    Im not usng jstree anywhere? I only TRIED to include it here when I saw the error was "missing jstree" unfortunately it did nothing to the bug. And I have not included this in the version that works on the other browsers. Im just trying to get Angularjs included in the IE extension without errors, first it gave a cryptic error that changed to missing jstree on including jquery explicitly. then adding in jstree did nothing. Ive tried both before and after jquery. does absolutely zilch to the bug. So please. Im not hiding anything or trying to be funny. I am genuinely stumped and need help. – Irtza.QC Dec 07 '15 at 10:36
  • 1
    Oh my bad then! I completly misunderstood it. You should add angularjs tag in question, it could be related to it – A. Wolff Dec 07 '15 at 10:37
  • Did you try to swap `jstree.min.js` and `jquery-1.11.3.js`? First load jQuery then jstree... – Legionar Dec 07 '15 at 10:45
  • that moved it along a little this time apparently. Now I'm getting the error `Object doesnt support property or method 'getBoundingClientRect'` – Irtza.QC Dec 07 '15 at 10:56
  • so its randomly going between the 2 errors `SCRIPT5007: Unable to get property _reference of undefined or null reference` and `Object doesnt support property or method 'getBoundingClientRect'` – Irtza.QC Dec 07 '15 at 11:00
  • Im not familiar with IE extension and even not sure what you mean but looks like some part of your code extension trying to use jstree but it could be something else. Id try to remove protocol from jq script source to check if it can be the issue jq2.src = "//code.jquery.com/jquery-1.11.3.js" buti guess no – A. Wolff Dec 07 '15 at 11:03
  • I mean that sometimes it gives one of those errors, sometimes another – Irtza.QC Dec 07 '15 at 11:08
  • tried it. No change. – Irtza.QC Dec 07 '15 at 11:08
  • try this may be helpful http://stackoverflow.com/questions/16809334/ie9-error-script5007-unable-to-get-value-of-the-property-ajax-object-is-nul or http://stackoverflow.com/questions/5787245/ie9-javascript-error-script5007-unable-to-get-value-of-the-property-ui-obje – Mahavirsinh Padhiyar Dec 07 '15 at 11:21
  • IE is already in IE=Edge mode So that changed absolutely nothing. – Irtza.QC Dec 07 '15 at 11:42

0 Answers0