[wp-hackers] ajax to call function in theme
Sharon Chambers
sharon at BrewerRadio.com
Thu Oct 29 16:51:00 UTC 2009
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
More information about the wp-hackers
mailing list