PDA

View Full Version : Sending & in AJAX POST



Mentor
14-06-2006, 02:12 AM
Im guessing its quite simple, but ive been googling for a while and still not found what im looking for.

Basically my news system POSTS an xmlhttp request containing the news, this news often includes urls which have the symbol "&" in them.

The problem is, when ever an & appears in the send, the news gets cut off
The reason is quite obvious, since its simply considering it a new post header.


xmlhttp.send("title=" + ctitle + "&comment=" + ccom);


Im guessing i need to somehow encode it, but i haven't got a clue how. Can anyone get me a solution?

Thanks in advance

Want to hide these adverts? Register an account for free!