> I am having some error when i try to pass a variable via javascript
> call to a php function.
...
> function showlistingsbystate(thestate)
...
> displayCarListingsbyState("'+thestate+'");?>';
...
> <?
....
> function displayCarListingsbyState($thestate){
>    global $database;

php doesn't work like that.  php runs server side, and creates a
webpage which is delivered to a client browser.
php execution is then finished.
When the client browser runs javascript, it cannot possibly get direct
access to server-side php functions.

You could look into how to access php functions via AJAX - you would
use a form submission technique to send data from client javascript to
a php server script, have the client javascript listen for a data
response from the server, and then do whatever with it within the same
webpage.
http://www.google.co.uk/search?hl=en&source=hp&q=php+ajax+tutorial&meta=&aq=f&oq=

This is not a maps question.

cheers, Ross K

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to