Using ExtJS 2.2.1, I have a container element that should load part of the HTML from the server using:
autoLoad: { url: 'someurl' }
This works fine in Firefox, but for IE7 it results in a syntax error in ext-all-debug.js on line 7170:
this.decode = function(json){
return eval("(" + json + ')');
};
I fixed this by turning this function into this:
this.decode = function(json){
return eval('(function(){ return json; })()');
};
Then AutoLoad works well in both browsers, but then there are some odd errors, and besides, you really don't want to fix this in the ExtJS library, since it will be unattainable (especially in minified ext-all.js, which is like half a megabyte of Javascript on one line).
I could not find much about this error.
Variations I tried:
// With <script> tags around all the HTML
autoLoad: { url: 'someurl', scripts: true }
// With <script> tags around all the HTML
autoLoad: { url: 'someurl', scripts: false }
, <script>. HTML Javascript, , Javascript HTML.
HTML, HTML, .
- :
, , - :
changeRolesForm = new Ext.Panel({
height: 600,
items: [{ autoScroll: true, autoLoad: WMS.Routing.Route("GetRolesList", "User") + '?userID=' + id}]
});
. text\html, json, . , , Firefox, Firefox eval, . , Firefox , , eval.