var point = new google.maps.LatLng(lat, lang);//Code for one marker
if (type == 'CONTROLLER')
{
mark = new google.maps.Marker(
{
position: point,
title: name,
map: map,
icon: "MapImages/controller.png"
});
}
function infowindow() //Code for InfoWindow
{
var i = 0;
var j=0;
var k=0;
var l=0;
var m = 0;
var text =.....;
alert(text);
var AJAX = ob_create();
alert("hello");
AJAX.onreadystatechange = function ()
{
alert(AJAX.readyState);
if (AJAX.readyState == 4 || AJAX.readyState == "complete")
{
document.getElementById("i").innerHTML = AJAX.responseXML.getElementsByTagName("name")[i].firstChild[0].nodeValue;
document.getElementById("j").innerHTML = AJAX.responseXML.getElementsByTagName("add")[j].firstChild[0].nodeValue;
document.getElementById("k").innerHTML = AJAX.responseXML.getElementsByTagName("mac")[k].firstChild[0].nodeValue;
document.getElementById("l").innerHTML = AJAX.responseXML.getElementsByTagName("lat")[l].firstChild[0].nodeValue;
document.getElementById("m").innerHTML = AJAX.responseXML.getElementsByTagName("long")[m].firstChild[0].nodeValue;
}
var url = 'Map3.aspx?Text=' +text.toString();
AJAX.open("Get", url, true);
AJAX.send(null);
}
},
I have created custom markers and custom InfoWindow, above is my code,
In Infowindow I need to pass the mark from marker in variable text in string form so that I can pass it to aspx page in query string format,but it is taking as object and I am not able to solve this problem,any help will be greatly appreciated.
Mark is the object for marker and
getTitle()is the method of marker to get the name of the device passed to marker via database.