...

View Full Version : AJAX concerns



Moose
07-02-2006, 02:55 AM
Alright I am having a few problems with AJAX.

First of I can get and post information except for when I post I am noticing that it is replacing all the + signs without me using replace at all. All I am doing is escaping the content as it must be escaped to be sent.

Second of all is there anyway to keep content escaped when sending it through AJAX and not having be unescaped when the data is posted?

Thanks for your help. :D

Beagle
07-03-2006, 04:18 PM
XMLHttpRequest.send("name=" + encodeURIComponent(value));

You must encode your data to send it across as a post. Are you doing this?

If so, could you post the value you're sending, the value you're expecting, and the value you're getting?

Moose
07-03-2006, 06:48 PM
I am doing:

XMLHttpRequest.send("name="+escape(value));

To my knowledge so far there isn't a difference between escape() and encodeURIComponent(). Tell me if I am mistaken.

Beagle
07-03-2006, 07:27 PM
http://blog.openboxsoftware.com/2006/04/javascript-escape-vs-encodeuricomponent/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum