SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Tables inside layers in netscape
-
Feb 16, 2001, 08:01 #1
- Join Date
- Feb 2001
- Location
- Lisboa - Portugal
- Posts
- 8
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi all
I'm trying do build a page that shows or hide a layer , every time i select a radio button.
Inside that layer I've got a table, and in one of the cells I've got a select box. Everything works ok in IE, but in netscape 4.7 the select box doesn't appear... How can I'solve this problem?
TIA
Lara
-
Feb 16, 2001, 20:06 #2
- Join Date
- Jul 2000
- Location
- 80,000 feet below the surface
- Posts
- 1,442
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Welcome aboard Lara! Great to have you here.
Can we get a code example?Netscape can only deal with
onclick
onmousedown
onmouseup
... when you're trying to use radio buttons. Netscape unfortunately doesn't recognise the other attributes available.
-
Feb 19, 2001, 04:46 #3
- Join Date
- Feb 2001
- Location
- Lisboa - Portugal
- Posts
- 8
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi again
Here is an example of code:
<table>
<tr>
<td class="formgriscla"><p class="dato">Entrega por correio: </p></td>
<td class="formgriscla"><input type="radio" name="correio" class="formgriscla" value="sim" onclick="javascript:esconderlayer();">Sim <input type="radio" name="correio" class="formgriscla" value="nao" onclick="javascript:mostrarlayer();">Não</td>
</tr>
<tr>
<td class="cabecera" colspan="2"><img src="images/1x1.gif" width=1 height=3 border="0"></td>
</tr>
</table>
<br>
<div id="envio" style="position:relative; visibility:hidden;">
<table border="0" cellpadding="3" cellspacing="1" width="500" align="center">
<tr>
<td class="cabeceratitulo" colspan="2"><p class="titulotabla">Escolha a Agência: </p></td>
</tr>
<tr>
<td class="formgrisosc"><p class="dato">Distrito: </p></td>
<td class="formgrisosc"><select name="distrito" size="1" class="formgrisosc"><option value="lisboa">Lisboa</option></select></td>
</tr>
<tr>
<td class="formgriscla"><p class="dato">Agência/p></td>
<td class="formgriscla">
<select name="agencia" size="1" class="formgriscla">
<option value="avliberdade" selected>Av da Liberdade</option>
<option value="castilho">R. Castilho</option>
</select>
</td>
</tr>
<tr>
<td class="cabecera" colspan="2"><img src="images/1x1.gif" width=1 height=3 border="0"></td>
</tr>
</table>
</div>
and here follows the javascript code:
function mostrarlayer()
{
form=document.forms[0];
var navegador = (navigator.appName == 'Netscape')?'NS':'IE';
if(navegador=='NS')
{
var layer="envio";
if(form.correio[1].checked)
{
document.layers[layer].visibility='visible';
}
}
if(navegador=='IE')
{
var layer = "envio";
if(form.correio[1].checked)
{
document.all[layer].style.visibility='visible';
}
}
}
function esconderlayer()
{
form=document.forms[0];
var navegador = (navigator.appName == 'Netscape')?'NS':'IE';
if(navegador=='NS')
{
var layer="envio";
if(form.correio[0].checked)
{
document.layers[layer].visibility='hidden';
}
}
if(navegador=='IE')
{
var layer = "envio";
if(form.correio[0].checked)
{
document.all[layer].style.visibility='hidden';
}
}
}
TIA
Lara
Bookmarks