Hi All,
I need some help with JS which is a part of a sigma grid ajax function. Here's an array with variable names as MySql table column names :
The field 'userlevel' can be 1, 5 or 9 and I don't want to display numbers but strings like 'guest', 'member' and 'admin' respectively. My knowledge in JS is VERY modest but I simply have to modify this script... What I've done so far is :Code:var dsOption= { fields :[ {name : 'username' }, {name : 'full_name' }, {name : 'userlevel' }, {name : 'email' }, {name : 'phone' } ], recordType : 'object' }
which doesn't seem to work... Do I need another approach maybe, could you guys please give some directions? Thank you!Code:switch (dsOption['userlevel']) { case 9: dsOption['userlevel'] = 'admin'; break; }



Reply With Quote
Bookmarks