Having Ajax Problems Entering & Ampersand Character In Form

Forums » Javascipt » Having Ajax Problems Entering & Ampersand Character In Form
if you are having trouble with the ampersand character in your HTML or javascript code i will teach you how you can solve this
i am using javasscript ajax form with php to enter a contact us form and users have been reporting that they send information with a url

for example:

http://www.example.com?ajac=1&code=2

i would only get http://www.example.com?ajac=1

it seem to cut off any text after teh & character

so how can i fix it?

this is how my javascript code looks like:

"&i=" + encodeURI( document.getElementById("i").value ) +


any help?
wallpaperama
change it to this:

"&i=" + escape( document.getElementById("i").value ) +


use the escape() function instead
http://wallpaperama.com/forums/ajax-problem-entering-und-character-in-form-t7468.html
Title: Having Ajax Problems Entering & Ampersand Character In Form [819]
Tags: ajax problem entering amp character in form
By , 1 Comments