« Return to Thread: ajax to call function in theme

ajax to call function in theme

by Sharon Chambers :: Rate this Message:

| View in Thread

I’m probably going about this the wrong way…
How would I use AJAX to call a function in my theme’s function file?
 
I’ve got a page template that loads a google map, and what I’d like to do is use a function in my template’s functions.php file to return stuff based on what’s near the original location.  So I’ve got a user-entered zip code, I’d like to look into my database for vendors near that zip code, and return them so I can use javascript to cycle through and place a marker on the map.
 
The way I’m trying to do it is simply passing the url to the AJAX “open” method; this doesn’t work, as $wpdb var is not recognized at this point.
 
Thoughts?
 
-Sharon Chambers
 
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

 « Return to Thread: ajax to call function in theme