I have lost my hopes on finding a strategy to my problem, hope someone might help me here. Here's the issue:

I've got a wordpress installation by having an extra table known as wordpress_lojas (for stores). The clients can turn to the website and thru an application, take their address, and taking advantage of the Google Maps Api, discover the stores near them.

Once the user submits the shape, I verify their address position (latitude/longitude) and thru a SQL query I seek the closest stores.

The shape transmits the parameters (latitude/longitude/radius) with an ajax requisition ($.publish()) to some php file that's within my theme folder (/wordpress-content/styles/accessorize/dadosLojas.php) which file develops an XML using the found stores.

Everything works fine offline, on my small local machine. Online I have your call answered "301 Moved Permanently". If everyone have Firebug installed and wish to try, the exam link is http://www.colletivo.com.br/accessorize/ and also the form is around the footer from the page. If everyone want a previous address from South america, try "Rua Vicente Leporace, 1534".

If you do not know very well what I attempted to describe, or require more information, please tell me.

Thanks greatly.

Wordpress will co-opt your AJAX demands to the given PHP file. It's all regulated black miracle in my experience, so someone having a better answer will probably arrive soon. The reality is, though, you need to pipe your AJAX demands via a special script that's made to route the request properly. Automatically, this is accomplished with ajax-admin.php (or maybe it was admin-ajax.php?)

If only I'd more particulars offhand, however i desired to a minimum of inform you that before you decide to use a lot of circles, there is a particular way you have to handle AJAX demands to some custom script in Wordpress.