Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/01/2010, 12:49
Avatar de maycolalvarez
maycolalvarez
Colaborador
 
Fecha de Ingreso: julio-2008
Ubicación: Caracas
Mensajes: 12.120
Antigüedad: 15 años, 9 meses
Puntos: 1532
Respuesta: Problemas con Event

no habia visto esa forma antes, además no te apegas a los estándares, los valores de los atributos en etiquetas se encierran en comillas: <tag att="value">..</tag> y el código en minúsculas de preferencia

por el evento en js seria así:

Código HTML:
<html>
<head>
<script type="text/javascript">
function eventoclick1(e){
	if(e==null){
		e=event;
	}
	if(e==null){
		e = window.event;//compatibilidad IE
	}
	var SelColor = document.getElementById('SelColor');
	SelColor.value = e.srcElement.title;
}
</script>
</head>
<BODY onload="document.getElementById('SelColor').focus()">
<TABLE ID="ColorTable" onclick="eventoclick1(event);">
<TR>
<TD BGCOLOR="aliceblue" TITLE="aliceblue">&nbsp;&nbsp;&nbsp;
</td><!-- cierres -->
</tr><!-- cierres -->
</TABLE>

<P>
<LABEL FOR="SelColor">Color:</LABEL>
<INPUT TYPE="TEXT" SIZE="20" ID="SelColor" >
<BR>
<SPAN ID="RGB">&nbsp;</SPAN>
</P><!-- cierres -->
<P>
<BUTTON ID="Ok" TYPE="SUBMIT">OK</BUTTON>
<BUTTON ONCLICK="window.close();">Cancel</BUTTON>

</P><!-- cierres -->
</BODY>
</html> 
edemás, exactamente que quieres hacer?, el evento no debería ir en la tabla, sino en cada fila o la celdasupongo, algo así?:
Código HTML:
<tr>
    <td onclick="eventoclick1(event);">&nbsp;</td>
    <td onclick="eventoclick1(event);">&nbsp;</td>
</tr> 

Última edición por maycolalvarez; 08/01/2010 a las 13:00