& Value not appearing with AJAX call

glennsea

New Member
I am working on submitting values into a database through AJAX. It currently uses JQuery Ajax object.My Ajax code basically looks like this:\[code\]enter code here\[/code\]var genre = form.new_album_genre.value; form.new_album_genre.value="";\[code\]$.ajax({ type: "POST", data: "genre="+genre+"&app="+app, url: 'apps/PVElectronicPressKitAdmin/ajax_add_album_genre.php', success: function(data) { $('#'+divID).html(data);\[/code\]}});In short, it gets a value from a form and then submits the data through a post. Where it fails if the genre is something like R&B. The & symbol is not sumbitting and only the R is. So how do I submit values through AJAX including &, + and = ?
 
Back
Top