skunjadia

want to pass dyanamic attributes in search option

Discussion created by skunjadia on Oct 19, 2011
Latest reply on Oct 19, 2011 by skunjadia
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[i] then it wont work..
 
working case bcoz its static attribs.POSTALCODE:

for (var i=0, il=results1.length; i<il; i++) {
             result = results1[i];
             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[i];
             attribs = result.feature.attributes;
             s.push("<tr><td>" + attribs.arrr[i] + "</td></tr>");
           }

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

Thanks,
Shweta

Outcomes