Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
75
rated 0 times [  80] [ 5]  / answers: 1 / hits: 19181  / 15 Years ago, fri, june 26, 2009, 12:00:00

I have some javascript that goes out and fetches a javascript class on another xhtml page. The remote javascript looks something like the following:



    (function() {
this.init = function() {
jQuery(#__BALLOONS__tabs).tabs();
};
})


After this is fetched into this.javascript, I try to eval it and instantiate:



   this.javascript = eval(( + this.javascript + ));
this.javascript = new this.javascript();
this.javascript.init();


Of course, this works perfectly in all browsers except IE. In IE, it fails at the eval line. Does anyone have suggestions on how I can make this work in IE or an alternative.



Thanks, Pete


More From » jquery

 Answers
112

Have you tried:



eval(this.javascript = ( + this.javascript + ));


...?


[#99232] Tuesday, June 23, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ansleyk

Total Points: 42
Total Questions: 100
Total Answers: 83

Location: Angola
Member since Wed, Apr 13, 2022
2 Years ago
;