|
Para esto se desarrolló un script en javascript. A continuación presento la solución que desarrolle para solucionar este problema, ojala les sirva.
Código Javascript
<script language="JavaScript">
lck=0;
function r(hval)
{
if ( lck == 0 )
{
document.formelia.color.value=hval;
}
}
function l()
{
if (lck == 0)
{
lck = 1;
} else {
lck = 0;
}
}
</script>
Código HTML
<form id="formelia" name="formelia" method="post" action="editoregistro.php">
<table border="0" height="18">
<tr>
<td> <input type="text" size="8" maxlength=7 class="textbox" name="color" value="" readonly> </td>
<td height="18" bgcolor="#A8A9AC"><a href="JavaScript:l()" onmouseover="r('#A8A9AC'); return true"><img src="images/col.png" height=18 width=10 border=0></a></td>
<td height="18" bgcolor="#BDBEC0"><a href="JavaScript:l()" onMouseOver="r('#BDBEC0'); return true"><img src="images/col.png" height=18 width=10 border=0></a></td>
<td height="18" bgcolor="#D3DCE3"><a href="JavaScript:l()" onMouseOver="r('#D3DCE3'); return true"><img src="images/col.png" height=18 width=10 border=0></a></td>
<td height="18" bgcolor="#FFFFFF"><a href="JavaScript:l()" onMouseOver="r('#FFFFFF'); return true"><img src="images/col.png" height=18 width=10 border=0></a></td>
<td height="18" bgcolor="#FF0000"><a href="JavaScript:l()" onMouseOver="r('#FF0000'); return true"><img src="images/col.png" height=18 width=10 border=0></a></td>
<td height="18" bgcolor="#0000FF"><a href="JavaScript:l()" onMouseOver="r('#0000FF'); return true"><img src="images/col.png" height=18 width=10 border=0></a></td>
</tr>
</table>
</form>
DesarrollandoWeb
andres desarrollandoweb.com
|