Subj : Re: _setProperty function get id=1? To : netscape.public.mozilla.jseng From : digdog Date : Wed Aug 24 2005 09:30 pm yes, use JSVAL_IS_INT(id) first, then JSVAL_TO_INT(id) to decide which you want. if (JSVAL_IS_INT(id)) { switch (JSVAL_TO_INT(id)) { case FIRST: break; case SECOND: break; case THIRD: break; } } .