Koko provjeriti checkbox?

Autor erbi, 16. Kolovoz 2013, 11:38

0 Članovi i 1 Gost pregledava ovu temu.

erbi

Kako da provjerim checkbox? Ovo radi:


case "EMAIL":
if (object.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) {return false;}
return true;

<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Company_name');?></td>
<td class="tablchet"><input name="email"   maxlength="90" type=text class="form"  value="" /></td>
</tr>

al ovo nikako neče:

case "ddv":
if (object.checked) {return true;}
return false;

</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Company_davcna');?></td>
<td class="tablchet"><input name="ddv"   maxlength="90" type=text class="form"  value="" /></td>
</tr>