Here is the json output from one of my controllers
[{"attributes":{"item_name":"Ford Escape","city":"Frisco"},"relations":[]},{"attributes":{"item_name":"house","city":"Dallas"},"relations":[]},{"attributes":{"item_name":"Car","city":"Plano"},"relations":[]}]
Here is the javascript code
function generateListElement(marker, attributes){
var ul = document.getElementById('sideContainer');
var li = document.createElement('li');
var aSel = document.createElement('a');
aSel.href = 'javascript:void(0);';
aSel.innerHTML = attributes.item_name;
aSel.onclick = function(){google.maps.event.trigger(marker, 'click')};
li.appendChild(aSel);
ul.appendChild(li);
}
My markers on the map works fine but on the sidebar <ul id="sideContainer" style></ul> the value that is being outputed is undefined and when I click on it shows the markers fine the only thing I need it the name of the it from the json array. Thanks for any help as soon as possible.

Help













