nao manjo nada de ajax... NADA mesmo.. meu negocio eh programação.. php!
queria saber se eh muito dificil fazer com q uma ceula de uma tabela fique visivel... e ao clicar em um botao ela suma e a outra celula tome o espaço dela!. como nessa imagem
Posted 11/02/2007, 14:58
Posted 11/02/2007, 16:03
Posted 12/02/2007, 13:02
<table width="200" border="1"> <tr> <td>aaa</td> <td onclick="this.style.display='none';">bbb</td> </tr> </table>
Posted 13/02/2007, 00:54
<a href="#" onclick="document.getElementById('a').style.display='block'; document.getElementById('b').style.display='block';">Mostrar tudo!!</a><br>
<a href="#" onclick="document.getElementById('a').style.display='block'; document.getElementById('b').style.display='none';">Mostrar A!!</a><br>
<a href="#" onclick="document.getElementById('a').style.display='none'; document.getElementById('b').style.display='block';">Mostrar B!!</a><br><br>
<table width="200" border="1">
<tr>
<td bgcolor="#0099CC" id='a'>aaa</td>
<td bgcolor="#00CC33" id='b'>bbb</td>
</tr>
</table>
Edição feita por: MastersRoX, 13/02/2007, 01:23.
Posted 13/02/2007, 11:09
Posted 13/02/2007, 11:57
Posted 13/02/2007, 12:49
<table width="200" border="1"> <tr> <td>aaa</td> <td id="eu" style="display:none;">bbb</td> </tr> </table> <input type="button" value="Ação!" onclick="action();" />
<script> function action(){ var el = document.getElementById('eu'); (el.style.display == 'none') ? el.style.display = 'block' : el.style.display = 'none'; } </script>
Posted 13/02/2007, 13:34
Posted 13/02/2007, 13:38
<a href="#" onclick="document.getElementById('a').style.display='table-cell'; document.getElementById('b').style.display='table-cell';">Mostrar tudo!!</a><br> <a href="#" onclick="document.getElementById('a').style.display='table-cell'; document.getElementById('b').style.display='none';">Mostrar A!!</a><br> <a href="#" onclick="document.getElementById('a').style.display='none'; document.getElementById('b').style.display='table-cell';">Mostrar B!!</a><br><br> <table width="200" border="1"> <tr> <td bgcolor="#0099CC" id='a'>aaa</td> <td bgcolor="#00CC33" id='b'>bbb</td> </tr> </table>
Edição feita por: matt.cavotta, 13/02/2007, 13:40.
Posted 13/02/2007, 13:45
Edição feita por: MastersRoX, 13/02/2007, 13:47.
Posted 13/02/2007, 13:53
<script> function mostra(id){ if(document.all) document.getElementById(id).style.display='block'; else document.getElementById(id).style.display='table-cell' } function esconde(id){ document.getElementById(id).style.display='none'; } </script> <a href="#" onclick="mostra('a'); mostra('b')">Mostrar tudo!!</a><br> <a href="#" onclick="mostra('a'); esconde('b')">Mostrar tudo!!</a><br> <a href="#" onclick="esconde('a'); mostra('b')">Mostrar tudo!!</a><br> <table width="200" border="1"> <tr> <td bgcolor="#0099CC" id='a'>aaa</td> <td bgcolor="#00CC33" id='b'>bbb</td> </tr> </table>
Posted 13/02/2007, 14:13
Posted 13/02/2007, 14:18
mas nos outros navegadores... oq acontece? as 2 celulas aparecem ... mas nao da pra clicar neh !?
Posted 14/02/2007, 23:18
Posted 15/02/2007, 13:24
uma duvida... com esse code...quando a pag eh carregada a celula ta aberta...
tem como fazer com q quando a pag carregue ela esteja escondida ?
style='diplay:none'
0 membro(s), 0 visitante(s) e 0 membros anônimo(s)