I'm using the store locator tutorial code and it works fine. I'm
trying to add an additional URL parameter to be sent to the PHP page
that generates the xml.  The part of the script that constructs the
URL is here:

var searchUrl = 'phpsqlsearch_genxml.php?lat=' + center.lat() +
'&lng=' + center.lng() + '&radius=' + radius;

I need to send an additional "sort" parameter so the XML results will
be sorted by name or distance. I created an additional input field in
the html and tried adding this to the script that constructs the URL:

var searchUrl = 'phpsqlsearch_genxml.php?lat=' + center.lat() +
'&lng=' + center.lng() + '&radius=' + radius + '&sort=' + sort;

It doesnt work

When I hard code the parameter like the following, it works fine.

var searchUrl = 'phpsqlsearch_genxml.php?lat=' + center.lat() +
'&lng=' + center.lng() + '&radius=' + radius + '&sort=name';

-OR-

var searchUrl = 'phpsqlsearch_genxml.php?lat=' + center.lat() +
'&lng=' + center.lng() + '&radius=' + radius + '&sort=distance';

so there is nothing wrong with the database or the xml or any of that.
The error is that the field value is not being passed to the URL
parameter.

Anyone have an idea on how to correct this?

Thanks very much,

Here is a link to the html page: 
http://www.realestatefinance.com/bankfinder/Locator.html

Here is a direct link to the xml generator with parameters plugged in:

http://www.realestatefinance.com/bankfinder/phpsqlsearch_genxml.php?lat=35+&lng=-85&radius=50&sort=distance

http://www.realestatefinance.com/bankfinder/phpsqlsearch_genxml.php?lat=35+&lng=-85&radius=50&sort=name

--~--~---------~--~----~------------~-------~--~----~
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