Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Celso Design

Link

Recommended Posts

Salve galera bem naum sei como fazer issu eu tenho 1 tabela e a linha dela eh um link qdo eu clicar vai aparecer uma outra tabela bem eu tenho o codigo em javascript dissu so gostaria q ficasse da seguinte maneira .... no bg desse linha da tabela qdo eu passo o mouse ela muda de cor queria q qdo clica se ela ficasse com 1 outro cor para diferenciar das outras tabelas !

 

segue o codigo

 

<script language=javascript>var cor; function selecionaGrid(elemento) { cor = elemento.style.backgroundColor; elemento.style.backgroundColor = "#97b98b";elemento.style.bordercolor = "#F5F5F5"; elemento.style.cursor = "hand";elemento.style.color = "#FFFFFF";} // Função para mudar a linha ao de-selecionar function deSelecionaGrid(elemento) { elemento.style.backgroundColor = cor; elemento.style.color = "#000000";} //--> function MostraTabela(tabela){		if (document.getElementById(tabela).style.display == "none"){			document.getElementById(tabela).style.display = "block";		}else{			document.getElementById(tabela).style.display = "none";		}	}function editaPedido(intPedido){	window.open('editar_pedido.aspx?idPedido=' + intPedido,'POP','width=700,height=600,menubar=no,resizable=no,scrollbars=no,top=5,left=50',true)}</SCRIPT>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Salve bem eu achei outro script aki msm no forum mas ainda naum eh o q eu quero qdo eu clico no td da tabela ela muda de cor normalz qdo eu vo e clico em outra tabela ela tira a cor e eu queria q ficasse com a cor depois q eu voltar a clica nessa tabela ae sim q ela volte a ficar com a cor anterior

 

bem o codigo da pagina esta aki

 

<html><head><title>Cor de célula com link em tabela</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style>  table#alter td {background:#F9FAF8;}  table#alter tr.dif td {	background:#568240;	color: #FFFFFF;	text-decoration: none;	cursor: hand;	border-top: 1px solid #568240;	border-right: 1px solid #568240;	border-bottom: 0px none;	border-left: 1px solid #568240;}</style><script LANGUAGE="Javascript"><!--<!--function mOvr(src,clrOver,texto,layer) {	if (!src.contains(event.fromElement)) {		src.style.cursor = 'hand';		src.bgColor = clrOver;		document.getElementById(layer).innerHTML = texto;		}}function mOut(src,clrIn,texto,layer) {	if (!src.contains(event.toElement)) {		src.style.cursor = 'default';		src.bgColor = clrIn;		document.getElementById(layer).innerHTML = texto;			}}// -->function Abrir_coluna(coluna){	if (document.getElementById(coluna).style.display == 'none'){		document.getElementById(coluna).style.display='block';	}else{		document.getElementById(coluna).style.display='none';	}}function MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}//--></script><script language="JavaScript">//Altera a cor da linha do grid quando clicada//Variáveisvar objAnt = new Object();function SetaCor(myElement){   if (myElement.className == "dif")  {			myElement.className ="";  }  else  {			myElement.className = "dif";  }    if (objAnt != myElement)  {   objAnt.className ="";					   }  objAnt = myElement;}</script><body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"><table width="100%" border="1" cellpadding="5px" cellspacing="0" bordercolor="#BAD0B1" id="alter">  <tr onClick="SetaCor(this);"> 	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7640')"><input type="checkbox" name="checkbox232" value="checkbox" id="checkbox234"></td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7640')">6965</td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7640')">1/2/2006 22:19:09</td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7640')">Vanda Almeida da 	  Cunha </td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7640')">valmeidadacunha-cnbr@yahoo.com.br 	</td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7640')">R$ 50.000,00 </td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7640')"><table width="100%" border="0" cellspacing="2" cellpadding="2">		<tr> 		  <td align="center" valign="middle" class="txtTahoma11Vermellho"><a href="#"><img src="images/bt_alterar.gif" width="55" height="19" border="0"></a></td>		  <td align="center" valign="middle" class="txtTahoma11Vermellho"><img src="images/spacer.gif" width="1" height="1"></td>		  <td width="50%" align="center" valign="middle" class="txtTahoma11Vermellho"><a href="#" class="txtTahoma11Vermellho"><img src="images/bt_historico.gif" width="73" height="19" border="0"></a></td>		</tr>	  </table></td>  </tr>  <tr onClick="SetaCor(this);" id="tr_7640" style="display:none"> 	<td colspan="7"><table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="alter"  style="DISPLAY: block">		<tr> 		  <td >teste</td>		</tr>		<tr> 		  <td >teste</td>		</tr>		<tr> 		  <td >teste</td>		</tr>		<tr> 		  <td >teste</td>		</tr>	  </table></td>  </tr></table><p class="dif"> </p><table width="100%" border="1" cellpadding="5px" cellspacing="0" bordercolor="#BAD0B1" id="alter">  <tr onClick="SetaCor(this);"> 	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7641')"><input type="checkbox" name="checkbox2322" value="checkbox" id="checkbox2323"></td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7641')">6965</td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7641')">1/2/2006 22:19:09</td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7641')">Vanda Almeida da 	  Cunha </td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7641')">valmeidadacunha-cnbr@yahoo.com.br 	</td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7641')">R$ 50.000,00 </td>	<td style="CURSOR: hand" onclick="Abrir_coluna('tr_7641')"><table width="100%" border="0" cellspacing="2" cellpadding="2">		<tr> 		  <td align="center" valign="middle" class="txtTahoma11Vermellho"><a href="#"><img src="images/bt_alterar.gif" width="55" height="19" border="0"></a></td>		  <td align="center" valign="middle" class="txtTahoma11Vermellho"><img src="images/spacer.gif" width="1" height="1"></td>		  <td width="50%" align="center" valign="middle" class="txtTahoma11Vermellho"><a href="#" class="txtTahoma11Vermellho"><img src="images/bt_historico.gif" width="73" height="19" border="0"></a></td>		</tr>	  </table></td>  </tr>  <tr onClick="SetaCor(this);" id="tr_7641" style="display:none"> 	<td colspan="7"><table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="alter"  style="DISPLAY: block">		<tr> 		  <td >teste</td>		</tr>		<tr> 		  <td >teste</td>		</tr>		<tr> 		  <td >teste</td>		</tr>		<tr> 		  <td >teste</td>		</tr>	  </table></td>  </tr></table><p class="dif"> </p><p> </p></body></html>

o link da pagina no ar eh este == Link ==

 

senha para acessar o disco virtual eh "" teste ""

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.