y como lo asigno a un determinado formulario? lo tengo puesto asi y no me funciona..
Código PHP:
<?
echo "checkbox valor: ".$cheked;
?>
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
image1 = new Image();
image1.src = "musika/upfiles/unchecked.gif";
image2 = new Image();
image2.src = "musika/upfiles/checked.gif";
function cambiar(id) {
if ( document.getElementById('checkbox_'+id).src != image1.src ) {
document.getElementById('checkbox_'+id).src = image1.src;
var cheked = false;
} else {
document.getElementById('checkbox_'+id).src = image2.src;
var cheked = true;
}
}
-->
</SCRIPT>
</head>
<body>
<form enctype="multipart/form-data" method="post" action="index.php">
<a href="javascript:cambiar('1')"><img id="checkbox_1" name="checkbox_1" value="si" src="musika/upfiles/unchecked.gif" width="14" height="16" border="0"></a>
<p><input type="submit" value="Enviar" name="B1"></p>
</form>
</body>
</html>