jQuery JSON AJAX Opera Safari IE but no FF problem

jQuery JSON AJAX Opera Safari IE but no FF problem


Hi everyone
I've got a problem with this code:
var SetAjaxEvents = function (){
$('form.ajax').each(
function() {
var action = $
(this).find('input[@name^="ajaxAction"]').val();
if( action != '' ){
$(this).ajaxForm({success:function(i){
eval(action+'('+i+')');
} });
}else{
$(this).ajaxForm();
}
}
);
}
$.fn.LoadAjax = function(link){
this.load(link,function(){SetAjaxEvents();});
}
I would like to get AJAX data and set for each form that will be
loaded i want to bind some event, loading is ok but after I try to
submit form from loaded data it trows errors.
How I set it up in my service:
I pu this in my source code <a onclick="$('element').LoadAjax('/path/
to/script');">add</a> when I click on it my script load some xhtml
data with form, all is all right nothing wrong, afterthat i try to
submit data with this form (this form souldn't reload page only send
data via AJAX) and during this execiution I get errors and i.e. in
Opera my JSON data is loaded as new page in browser window (on FF all
right data is recived end setting up on my page without reload). On IE
and safari no action is executed.
It this Error Console form Opera:
Timeout thread: delay 13 ms
Error:
name: SyntaxError
message: Statement on line 2019: Syntax error in call to eval: line
12 :
-->
-----^
Backtrace:
Line 2019 of linked script http://domeny.mst.web10.wtc.pl/js/jquery.js
eval.call(window, data);
Line 1705 of linked script http://domeny.mst.web10.wtc.pl/js/jquery.js
jQuery.globalEval(this.text || this.textContent || this.innerHTML
|| "");
Line 339 of linked script http://domeny.mst.web10.wtc.pl/js/jquery.js
if (fn.apply(obj[i], args || [i, obj[i]]) === false)
Line 92 of linked script http://domeny.mst.web10.wtc.pl/js/jquery.js
return jQuery.each(this, fn, args);
Line 1701 of linked script http://domeny.mst.web10.wtc.pl/js/jquery.js
return this.find("script").each((function ()
{
if (this.src)
jQuery.getScript(this.src);
else
jQuery.globalEval(this.text || this.textContent || this.innerHTML
|| "");
}
)).end();
Line 1690 of linked script http://domeny.mst.web10.wtc.pl/js/jquery.js
self.attr("innerHTML",
res.responseText).evalScripts().each(callback, [res.responseText,
status, res]);
Line 1882 of linked script http://domeny.mst.web10.wtc.pl/js/jquery.js
s.complete(xml, status);
At unknown location
[statement source code not available]
In my opinion this is something wrong with jQuery core, specialy with
geting JSON data from response.
response is in JSON format correct i will check it double. At FF
works.
I will be grateful if you help solve this problem
Thanx in advance
My Dev Enviroment:
Opera 9.23 Safari and IE(6 & 7) FF 2.0.0.6
jQuery 1.1.3.1 with Interfaces, blockUI, validate, thickbox, metadata