The situation comes like this using form plugin from http://plugins.jquery.com/project/form :
$('#photoform').ajaxForm({ dataType : 'json' , success : function(data){ alert( data.result ) ; }, error: function(){ alert('error'); } }); this starts to send file input with post method via hidden iframe. The result json data can be read with small workarround with <textarea> {jsondata}</textarea>. If I use in any of my other js file the document.domain definition, the success callback never came, and allways the error callback is risen. Any how the post ajax submit is done well, only the success callback never comes. Without document.domain definition this came back and everything fine. Any idea? Plugin improovment? Thanks Vaclav.