Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Reference JS library/function in another JS library with Chrome or Firefox

$
0
0

Hi,

I am having problems referencing another JS library/function within another. I actually was able to do this in IE via this code:

------------

LoadWebResource = function(resourceName) { 
      var httpRequest = new ActiveXObject("Msxml2.XMLHTTP");  //not supported by Chrome or Firefox!
      httpRequest.open("GET", Xrm.Page.context.getClientUrl() + "/webresources/" + resourceName, false);
      httpRequest.send(null); 
      try { eval(httpRequest.responseText); } 
      catch (e) {  alert("Error loading " + resourceName + ":\n" + e.description); } 
 }

LoadWebResource("mag_/js/alert.js");

------------

The problem is that ActiveXObject is only supported by IE, not chrome or firefox.

Is there a similar method that works in all browsers?




 


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>