[mapguide-users] Re: Layer properties problem
Is the problem here in your OnLayerChange() function: propertySelect.options[i] = new Option(properties[i].name, i, false, false); You are just passing in the variable i as the value, not the proper value. I don't know if it is as simple as replacing this line with: propertySelect.options[i] = new Option(properties[i].name, properties[i].value, false, false); -- View this message in context: http://n2.nabble.com/Layer-properties-problem-tp4863462p4876607.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Layer properties problem
in the Html source there is an option values for this layerproperties. Property: Actually i have not write any php code for this option values.How to set these option values? Regards, padmini G. -- View this message in context: http://n2.nabble.com/Layer-properties-problem-tp4863462p4876547.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Layer properties problem
View the source of the HTML in the browser, and confirm that the right values are present for each option. In other words, make sure that you have: FeatId Parcel Area and not: Feature ID Parcel Area Regardless of this, try: alert(propertySelect[propertySelect.selectedIndex].name) Tom -- View this message in context: http://n2.nabble.com/Layer-properties-problem-tp4863462p4876305.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Layer properties problem
Hi, Thanks for your reply. in propertySelect dropdown list i have the properties like FeatId,Parcel,Area etc. by putting alert(propertySelect[propertySelectselectedIndex].value) as told by your prev mail it gives me the numerical value of the selected index(for ex if i select parcel it gives me 1)but i want to come as Parcel Regards, Padmini G. -- View this message in context: http://n2.nabble.com/Layer-properties-problem-tp4863462p4869217.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Layer properties problem
To get back to your original question, from what I can see, your code will set every option as "selected". But which item do you want to be selected? That list is generated before any user interaction, so which option should be selected? Once the user chooses one option, you can get at it via: inputName.selectedIndex - this gives the numerical index of the item selected inputName[inputName.selectedIndex].value - this gives the value of the item selected I hope this answers your question. Tom -- View this message in context: http://n2.nabble.com/Layer-properties-problem-tp4863462p4865266.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Layer properties problem
Is there a missing close PHP tag?: $layerLabel) { ?> > -- View this message in context: http://n2.nabble.com/Layer-properties-problem-tp4863462p4864810.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Layer properties problem
Perhaps view the source of the page, and post that here, just to make sure the right values are populating the form select drop-downs. Tom -- View this message in context: http://n2.nabble.com/Layer-properties-problem-tp4863462p4864331.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Layer properties problem
Hi Tom, Thanks for your reply. i tried that one but it comes as index value not itemalert (propertySelect[propertySelect.selectedIndex].value); gives me 1 ,2 (selected index value) but i want to pass the propertyname as (featid,parcel etc) Regards, Padmini G. -- View this message in context: http://n2.nabble.com/Layer-properties-problem-tp4863462p4864251.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Layer properties problem
Hi, Thats what iam asking for php code After the layername dropdown list box there is some php code for setting the selected dropdown list $layerLabel) { > Is there any php code for setting layer properties also iam unable to know how to set that value... Please guide me.. -- View this message in context: http://n2.nabble.com/Layer-properties-problem-tp4863462p4864388.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Layer properties problem
Instead of your: alert(propertySelect.value); [it comes as the index value] try: alert(propertySelect[propertySelect.selectedIndex].value); Does that fix it? This is a Javascript issue, not a PHP one. Tom -- View this message in context: http://n2.nabble.com/Layer-properties-problem-tp4863462p4864089.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users