I have a script that is used to make ajax calls and it takes the callback function as a parameter. It then uses an eval to call that function with the responseText.
[code=javascript]
function makeHttpRequest (myURL, callbackFunctio n, returnXML, callType, parms)
{
.....
http_request.on readystatechang e = function() {
if (http_request.r eadyState == 4) {
if (http_request.s tatus == 200) {
if (callbackFuncti on) {
if (returnXML) {
eval(callbackFu nction + '(http_request. responseXML)');
} else {
eval(callbackFu nction + '(http_request. responseText)') ;
}
}
.....
[/code]
This works fine in IE6/7 and was working last week in FF .6 and .7 but now it doesn't (no code changes). I installed the firebug extension this afternoon and then ran this again and it worked. I disabled the extension and it failed again (no errors in the regular console).
Any help or ideas would be greatly appreciated.
[code=javascript]
function makeHttpRequest (myURL, callbackFunctio n, returnXML, callType, parms)
{
.....
http_request.on readystatechang e = function() {
if (http_request.r eadyState == 4) {
if (http_request.s tatus == 200) {
if (callbackFuncti on) {
if (returnXML) {
eval(callbackFu nction + '(http_request. responseXML)');
} else {
eval(callbackFu nction + '(http_request. responseText)') ;
}
}
.....
[/code]
This works fine in IE6/7 and was working last week in FF .6 and .7 but now it doesn't (no code changes). I installed the firebug extension this afternoon and then ran this again and it worked. I disabled the extension and it failed again (no errors in the regular console).
Any help or ideas would be greatly appreciated.
Comment