Sending Post Parameters With Ajax


 
Thread Tools Search this Thread
Top Forums Web Development Sending Post Parameters With Ajax
# 1  
Old 06-13-2009
Sending Post Parameters With Ajax

Hi!!!
I'm having a little problem with a web application I'm developing.
I need to send a query to a php script using post method of Ajax.
I created the variable where the query is stored and it looks like this:

consulta= barrio="Monserrat" or barrio="Palermo"&buscar=1;

this is in a variable called params...
The problem is that the php script never receibes de "consulta" variable, actually it receives it but it's empty...

I'm totally sure that the problem is that i need to scape same characters but i don't know how to do it... can someone help me????

Thanks!!!!
# 2  
Old 06-14-2009
It's simple. Just call encodeURIComponent() function to escape individual values from Javascript before getting to XmlHttpRequest (or whatever wrapper you may be using).

This is the documentation:

https://developer.mozilla.org/en/Cor...deURIComponent
# 3  
Old 06-14-2009
oh! thanks!! it works great!!
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making post down hook script for svn regarding sending emails after an file is committed in svn

Hi Folks , I am asking this question but i apologise please if this is not the correct forum , I have to develop a shell script that i want to place in at hooks/post-commit , that is basically i have to develop a post hook script and the main functionality of that script would be lets say if... (0 Replies)
Discussion started by: sunsun06060606
0 Replies

2. Web Development

Ajax Post & IE8

I have an Ajax script that runs on IE9 & FF but not IE8...well it runs but there is some sort of memory leak so the script runs slower and slower with each consecutive click because the code being processed is not being cleared each time, or something. I found some articles online and tried them... (0 Replies)
Discussion started by: tifischer
0 Replies

3. AIX

tuning network parameters : parameters not persist after reboot

Hello, On Aix 5.2, we changed the parameters tcp_keepinit, tcp_keepintvl and tcp_keepidle with the no command. tunrestore -R is present in inittab in the directory /etc/tunables we can clearly see the inclusion of parameters during reboot, including the file lastboot.log ... (0 Replies)
Discussion started by: dantares
0 Replies

4. Shell Programming and Scripting

help me in sending parameters from sqlplus script to unix shell script

Can anybody help me out in sending parameters from sql*plus script to unix shell script without using flat files.. Initially in a shell script i will call sql*plus and after getting some value from some tables, i want that variable value in unix shell script. How can i do this? Please tell me... (2 Replies)
Discussion started by: Hara
2 Replies
Login or Register to Ask a Question