AJAX charset UTF-8
When Ajax sends a form it converts the characters to UTF-8. So when submitting a form the + sign turns into a blank " "To fix this just add encodeURIComponent to where you call your form.element.value.
Example:
function frmLoop(cForm)
{
this.formname = cForm;
var qStrText = ""
var theForm = document.forms[this.formname]
for(i=0; i<theForm.elements.length; i++)
{
if(theForm.elements[i].type == "text" || theForm.elements[i].type == "password" || theForm.elements[i].type == "hidden" || theForm.elements[i].type == "textarea" || theForm.elements[i].type == "button")
{
qStrText += "&" + theForm.elements[i].name + "=" + encodeURIComponent(theForm.elements[i].value) + ""
}
}
return qStrText;
}
Select a link on the right
Feel like contacting me feel free:
eday69@gmail.com
AJAX/Javascript