By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,400 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

POST a form with XmlHttpRequest

P: n/a
ok here is my problem I have a form in a webpage that I want to submit
and get the result back without reloading the page.

I've seen many times ppl using text/x-www-form-urlencode but I was
wondering if it was possible somehow to submit the form element
directly so I wouldn't have to process the form to put it in a string.

If there is anyway I would be happy if not seems I'll have to
transform the form into a string request.

Thanks in advance for your help.
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


Henri-Bastien wrote:
If there is anyway I would be happy if not seems I'll have to
transform the form into a string request.


XMLHttpRequest is mostly meant to exchange XML as data so you can
directly pass a DOM node like an XML DOM document to the send method but
if you want to send form data as application/x-www-form-urlencoded
content then you have to build that string yourself from the form that
you can walk with the DOM to build the string.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

P: n/a
I don't need to send it in x-www-fomr-urlencoded only thing I need is
to get the same result as doing form.submit without having to reload
the page AND being able to get the result back. Because the script run
localy but I access a remote page. For that reason I can't simply put
the form in an other frame because DOM doesn't allow that in
explorer....

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.