Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/01/2010, 03:03
vesvello
 
Fecha de Ingreso: noviembre-2007
Mensajes: 118
Antigüedad: 16 años, 6 meses
Puntos: 0
Cambiar texto...

Tengo este codigo para mostrar / ocultar celdas de una tabla al pulsar un enlace, pero quisiera como hacer para cambiar el texto "Prefiero buscar por Zonas o Barrios" por ocultar cuando las celdas estan visibles

Gracias de antemano.

Código:
<script type="text/javascript">
function cambiar(esto)
{
	vista=document.getElementById(esto).style.display;
	if (vista=='none')
		vista='block';
	else
		vista='none';

	document.getElementById(esto).style.display = vista;
</script>
<a href="#" onclick="cambiar('ejemplo'); return false;">Prefiero buscar por Zonas o Barrios</a>
<tr id="ejemplo" style="display: none;">
<td>
<table>
  <tr height="35px" >
    <td width="275" align="left" class=iselect>Zona</td>
</tr>
  <tr height="35px">
	<td width="275"><input type="text" value="<?php echo get_param("zona");?>" name="zona"></td>
</tr>
<tr height="35px">
    <td width="275" align="left" class=iselect>Sector</td>
	</tr>
<tr height="35px">
	<td width="275"><input type="text" value="<?php echo get_param("sector");?>" name="sector"></td>
</tr>
</table>
</td>
</tr>