View Full Version : Ajax and forms

03-09-2006, 06:53 PM
Hello! For first I am sorry for my English.
For second here is my question. Can I send form through ajaxpage and how does it look, if it is possibly? Form method is POST, because form data contents non-English caracters.
Thank you.

03-09-2006, 07:01 PM
See http://www.dynamicdrive.com/forums/showthread.php?p=28428.

03-09-2006, 07:09 PM
Thanks! You are really God!

03-09-2006, 07:23 PM
Haha, glad to hear it :D

03-10-2006, 10:34 AM
I am sorry, but I found some problems with that code...
For first Opera does not work with document.getElementById(formID).elements It is only on my computer?
For second data is not sending... in Fierfox javascript console is this message:

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ajax.js :: ajaxpage :: line 46" data: no]

Can you help me?

03-10-2006, 05:13 PM
See the comment:
// formID needs to be the ID of your formReplace "formID" with the name of your form, in quotes.

03-10-2006, 06:27 PM
I understood this, but it does not work in my Opera 8! I tried document.forms[formName] and document.formName and simply formName.elements, but does not work. Is the problem in my browser?

03-10-2006, 06:56 PM
It should work with Opera too.
Have a fish instead.

03-10-2006, 07:42 PM
It is only on localhost in the meantime. But I will test it on different computers and on different versions of browsers.
Thank you for help.