Select to view content in your preferred language

want to pass dyanamic attributes in search option

1104
1
10-19-2011 07:43 PM
shwetakunjadia
Emerging Contributor
Hi,

In my case after searching i m trying to display result in table..
POSTALCODE is my field name but it is like static i want it dynamic means i m having string array of fields depends on layer selection so if i m trying to use attribs.array then it wont work..
 
working case bcoz its static attribs.POSTALCODE:

for (var i=0, il=results1.length; i<il; i++) {
             result = results1;
             attribs = result.feature.attributes;
             s.push("<tr><td>" + attribs.POSTALCODE+ "</td></tr>");
           }



not working bcoz i m passing value through string array :

for (var i=0, il=results1.length; i<il; i++) {
             result = results1;
             attribs = result.feature.attributes;
             s.push("<tr><td>" + attribs.arrr + "</td></tr>");
           }

Please someone help me...........

Thanks,
Shweta
0 Kudos
1 Reply
shwetakunjadia
Emerging Contributor
After fighting a lot i got result 😛

attribs[field_search_list[j1]];


Thanks,
Shweta
0 Kudos