Hallo, I have tried to use jquery for a current project. To test it, I have created following code:

<
html>
<body>
<title>JSON-Test</ title>
<script language="_javascript_" type= "text/_javascript_" src="json.js"></script>
<script language="_javascript_" type="text/_javascript_" src="jquery.js"></script>
<script language= "_javascript_" type="text/_javascript_">
function getFormData() {
var test1 = $("#test1").val();
var test2 = $("#test2").val();
var obj = new Object();
obj.test1 = test1;
obj.test2 = test2;

var objString = obj.toJSONString();

$.post("json.php", {data: objString}, handleJsonResponse);
return false;
}


function handleJsonResponse(data) {
var obj = data.parseJSON();

$("#test1").val(obj.test1);
$("#test2").val(obj.test2);
}


$(document).ready(function(){
$("#formular").submit(getFormData);
});

</script>

< body>
<form id="formular" action= "/projekte/test/json.php" method="post">
<input type ="text" name="test1" id= "test1" /><br />
<input type ="text" name="test2" id= "test2" /><br />
<input type ="submit" name="submit" id= "submit" value="senden"/>
</form
>
</body>
</html>


I use jquery Rev: 213 (complete)

When I'm loading the page in Firefox or Internet-Explorer (at different pcs)
I get the error "Too much recursion" on line 71 (many times), line 104, 1597.

Any idea, why this error appears? I use WinXP with current updates.

Mathias

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to