Hi, found the solution for my problem, surprise, surprise: form html was invalid meaning that closing tag of form was <form> :) FF was able to parse DOM, IE not.
Mike, havent tested but I think that $("#editDiv form").serializeArray() works also. Cheers Olli On Dec 18, 5:30 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > Just out of curiosity, does this work? > > var data = $("#editDiv form").serializeArray(); > > Mike > > On Dec 18, 2007 7:55 AM, elias <[EMAIL PROTECTED]> wrote: > > > > > Hi, I have a following problem, FF2 works fine, IE not: > > > I have a form that is written dynamically on page, by dynamically I > > mean that form html comes from ajax response like this: > > > function getForm() { > > $.ajax({ > > url: actionurl, > > data: data, > > success: function(html){ > > $("#editDiv").empty(); > > $("#editDiv").html(html); > > }, > > type:"POST", > > cache:false > > }); > > return false; > > } > > > and then another function that serializes the form input fields and > > sends data to server when #editForm is submitted: > > > function paSave() { > > var data = $("#editForm").serializeArray(); > > $.ajax({ > > url: actionurl, > > data: data, > > success: function(resp){ > > ...... > > }, > > error: function(XMLHttpRequest, textStatus, > > errorThrown) { > > .... > > }, > > type:"POST", > > dataType: "json", > > cache:false > > }); > > return false; > > } > > > And it seems that with IE7 $("#editForm").serializeArray() returns > > null, FF returns nicely data object holding form values. > > > Have someone else had this problem before, any help would be > > appreciated!