Using If...Then Statements from Attributes

Discussion created by breilly47 on Sep 20, 2011
Latest reply on Sep 20, 2011 by stevel
Is there a way to have Javascript's If/Then statements work from a polygon's attributes? I was just wondering since it would be a great way to add functionality to a web application. I'm developing a building floor plan map, and would like the search function to be able to automatically switch to a room's given floor automatically. Something like (this is just a rough idea) if floor = "1" then [run function that shows floor one], else if floor = "2" [run function that shows floor two] and so on. Has anybody tried this or had any luck using this (or a similar) method?