Try_Fizzle
Try_Fizzle

Reputation: 49

Download URL can only pass 1 php variable to attributes for google maps markers?

I am a bit of a newbie when it comes to this sort of stuff, however I am struggling to pass some variables.

Info: I have posted 2 values (using JQuery) from 2 drop down boxes from a HTML page year and month. I pass it to a PHP page to modify an SQL query which seems to be ok. Problem is when I download the PHP page via Download URL only the first value out of the 2 seems to be manipulating the attributes data for the markers. Any suggestions are appreciated.

downloadUrl("city_markers2.php?yearID="+yearID+"city_markers2.php?monthID="+monthID, function(data) { 
    var xml = data.responseXML; 
    var markers = xml.documentElement.getElementsByTagName("marker"); 
    var iconBase = 'http://www.google.com/mapfiles/';

        for (var i = 0; i < markercount.length; i++) 
    { 
        markercount[i].setMap(null);
    }

Upvotes: 2

Views: 400

Answers (1)

Russell P.
Russell P.

Reputation: 108

You are attempting to include two files in your downloadUrl code

downloadUrl("city_markers2.php?yearID="+yearID+"city_markers2.php?monthID="+monthID

When it should be

downloadUrl("city_markers2.php?yearID="+yearID+"&monthID="+monthID

Adding that fix should give you both sets of data.

Upvotes: 1

Related Questions