Sending a DOM object to PHP over Ajax

Hey guys,

I’ve got a DOM object containing an entire form, and I need to send the entire object to PHP through ajax. It’s important to maintain the values of each input field.

I don’t know what fields are going to be in the form, and that is why I must send the entire form. If there is an alternative, I’m open to it, but I’d prefer to receive xml into the PHP file.

So far, I have something like this:

xmlHttp.open("POST",'filename',true);
xmlHttp.send(document.getElementById('element_id'));

Is there any method to convert a dom object to a string or xml?

Thanks :slight_smile:

Note: This is a commercial project, and I am unable to use any open source software, so please don’t post any ajax libraries.