Lefu Posted December 22, 2007 Share Posted December 22, 2007 hi all I need to know how do I compare the following enumeration values with a string to get either of numbers. What am I doing wrong? var eFilterType = { No:0, Yes:1 }; var i = 'No'; if (eFilterType == i) alert('success'); Thanx a lox Quote Link to comment Share on other sites More sharing options...
Lefu Posted December 22, 2007 Author Share Posted December 22, 2007 I have solve my problem this way. for(var j in eFilterType) { if (i == j) alert('Alert the world'); } Then I was able to continue with my bad intentions. have a good time programming Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.