function something(frm,i){
//var ch=frm.outof1.value;
for(var j=1;j<=i;j++)
{
//var b="outof" + j;
alert(frm.outof+j.value);
}
//alert("outof" + i);
return false;
}
$js='onClick="something(this.form,\''. $ii .'\')"';
echo form_button('mybutton', 'Click Me', $js);
and getting output NAN where in html this is // echo form_input('outof'.$i,''); // the form input.
echo form_button('mybutton', 'Click Me', $js);?