Kenneth solved that problem a while ago. Do some searching before asking 
question FGS.

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of padmini godavarthi
Sent: Wednesday, March 24, 2010 9:59 AM
To: [email protected]
Subject: [mapguide-users] GT Application+Query problem



Hi,
i want to do query function so i have downloaded sample GT application from
the site  

  trac.osgeo.org
the query feature works fine for GT data.i want to use the same function for
my data.
but  in my application only layernames are displaying in dropdown list  but
the  layer properties(ex:featId) are not displaying in another
dropdownlist....

i think the problem is with OnLayerChange() function in querymain.php

function OnLayerChange()
                {
            var layerSelect = document.getElementById("layerSelect");
            var propertySelect = document.getElementById("propertySelect");
            var outputSelect = document.getElementById("outputSelect");

            reqParams = "COMMAND=GETLAYERPROPERTIES";
                        reqParams += "&SESSION=" + encodeURIComponent(session);
            reqParams += "&MAPNAME=" + encodeURIComponent(mapName);
                        reqParams += "&LAYERNAME=" + 
encodeURIComponent(layerSelect.value);
alert(reqParams);

       function getHTTPObject()
           {
           if (window.ActiveXObject) return new 
ActiveXObject("Microsoft.XMLHTTP");
            else if (window.XMLHttpRequest) return new XMLHttpRequest();
            else {
             alert("Your browser does not support AJAX.");
             return null;
             }
  }
 reqHandler=getHTTPObject();
 if ( reqHandler != null) {
            reqHandler.open("POST", "querycontroller.php", true);
}
queryReqHandler.onreadystatechange = OnReadyStateChange;
reqHandler.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");

                                        reqHandler.send(reqParams);
                                        try
{
properties = reqHandler.responseText.parseJSON();
}
catch(e)
{
alert(e);
}
propertySelect.options.length = 0;
outputSelect.options.length = 0;
for (var i = 0; i < properties.length; i++)
{
propertySelect.options[i] = new Option(properties[i].name, i, false, false);
outputSelect.options[i] = new Option(properties[i].name, i, false, false);
alert(properties[i].name);
}
OnPropertyChange();
}

in this code i am unable to goto  querycontroller.php(for testing purpose i 
just want to display echo message.but its not displaying)....

if anybody aware of that let me know..........................

Regards,
padmini G.
-- 
View this message in context: 
http://n2.nabble.com/GT-Application-Query-problem-tp4789798p4789798.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to