Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I prevent jquery ajax to encode certain chars on data parameter?

Tags:

jquery

ajax

i am using jquery ajax to query data from a three party web service the problem is that I need to pass the colon char : as part of the data, without encoding it but $.ajax method is automaticaly encoding all non alphabetic chars. so the question is
how do I prevent jquery ajax to encode certain chars on data parameter?
update
I know that the colon is encoded because I see it with Firebug
update
if i use this on the browser url box I get my desired data
http://example.com?callback=jsonp1316104718105&quit=20100299222.0&show=name:fransisco
if i use this on the browser url box I get wrong data
http://example.com?callback=jsonp1316104718105&quit=20100299222.0&show=name%3Afransisco
the problem is that $.ajax is compiling the last one

like image 519
Luis Siquot Avatar asked Feb 17 '26 02:02

Luis Siquot


1 Answers

You can use a string:

$.ajax({
   data: "colons=::::::::",
   processData: false,
   ....
});
like image 192
Joe Avatar answered Feb 19 '26 15:02

Joe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!