DHTML Et Netscape 4.78
Lydia
-
miodrag -
miodrag -
bonjour, Je suis débutante en DHTML et j'aimerais faire une division, style un fenetre qui n'en ai pas une, qui s'afficherais dynamiquement. Avec Internet Explorer 5 et 6 et Netscape 6.2 tout fonctionne a merveille mais j'arrive pas a le faire fonctionner sans probleme avec Netscape 4.78. Avec un peu de gossage j'arrive a le faire apparaitre mais y veux pu disparaitre apres. Puis en plus les images de bloc sont toujours visible meme au depart, et sur Netscape 6.2 y sont juste toujours invisible.
Voici le code de base:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<script language="JavaScript1.2">
<!-- Begin
var DHTML = (document.getElementById || document.all || document.layers);
function getObj(name)
{
if (document.getElementById){
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
}
else if (document.all){
this.obj = document.all[name];
this.style = document.all[name].style;
}
else if (document.layers){
this.obj = document.layers[name];
this.style = document.layers[name];
}
}
function ShowDivCPri(){
if (!DHTML){alert ("Votre navigateur internet ne vous permet pas d'accèder à cette élément.\nEssayer en utilisant une version récente de Internet Explorer ou de Netscape."); return;};
var x = new getObj('DivColorPri');
x.style.visibility = (x.style.visibility=='visible') ? 'hidden' : 'visible'
}
// End -->
</script>
</head>
<body>
<table border=0 width=50%>
<tr><td width=150 align="right" height=20>Couleur primaire : </td>
<td><table id="ColorPri" border=1 height=100% cellspacing=0 cellpadding=0 bgcolor="#7777CC" class=BlockColor><tr><td><a href='javascript:void(0);' onClick="ShowDivCPri()"> </a></td></tr></table>
</td></tr>
</table>
<!-- DivColorPri -->
<table id="DivColorPri" border="2" bordercolor="darkblue" cellspacing="0" style="position:absolute; left:0; top:0; layer-background-color:#EEEEEE; background-color:#EEEEEE;width:150;height:85;visibility:hidden;padding:1px">
<tr><td height=20><center>Sélection de couleur</center></td></tr>
<tr><td>
<table border="1" cellspacing=1 cellpadding=0 bordercolor="red" height="12" width="141" background="Images/bar.Jpg" style="top: -3; position:relative">
<tr><td><IMG src="Images/blockImg.jpg" style="HEIGHT:10px; LEFT:0px; TOP:0px; WIDTH:12px; position:relative"></td></tr>
</table>
<table border="1" cellspacing=1 cellpadding=0 bordercolor="Green" height="12" width="141" background="Images/bar.Jpg" style="top:0; position:relative">
<tr><td><IMG src="Images/blockImg.jpg" style="HEIGHT:10px; LEFT:0px; TOP:0px; WIDTH:12px; position:relative"></td></tr>
</table>
<table border="1" cellspacing=1 cellpadding=0 bordercolor="Blue" height="12" width="141" background="Images/bar.Jpg" style="top:3; position:relative">
<tr><td><IMG src="Images/blockImg.jpg" style="HEIGHT:10px; LEFT:0px; TOP:0px; WIDTH:12px; position:relative"></td></tr>
</table>
</td></tr>
</table>
<!-- End DivColorPri -->
</body>
</html>
Si y a quelqu'un qui a un commentaire ou une suggestion qui ne ce géne pas.
Voici le code de base:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<script language="JavaScript1.2">
<!-- Begin
var DHTML = (document.getElementById || document.all || document.layers);
function getObj(name)
{
if (document.getElementById){
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
}
else if (document.all){
this.obj = document.all[name];
this.style = document.all[name].style;
}
else if (document.layers){
this.obj = document.layers[name];
this.style = document.layers[name];
}
}
function ShowDivCPri(){
if (!DHTML){alert ("Votre navigateur internet ne vous permet pas d'accèder à cette élément.\nEssayer en utilisant une version récente de Internet Explorer ou de Netscape."); return;};
var x = new getObj('DivColorPri');
x.style.visibility = (x.style.visibility=='visible') ? 'hidden' : 'visible'
}
// End -->
</script>
</head>
<body>
<table border=0 width=50%>
<tr><td width=150 align="right" height=20>Couleur primaire : </td>
<td><table id="ColorPri" border=1 height=100% cellspacing=0 cellpadding=0 bgcolor="#7777CC" class=BlockColor><tr><td><a href='javascript:void(0);' onClick="ShowDivCPri()"> </a></td></tr></table>
</td></tr>
</table>
<!-- DivColorPri -->
<table id="DivColorPri" border="2" bordercolor="darkblue" cellspacing="0" style="position:absolute; left:0; top:0; layer-background-color:#EEEEEE; background-color:#EEEEEE;width:150;height:85;visibility:hidden;padding:1px">
<tr><td height=20><center>Sélection de couleur</center></td></tr>
<tr><td>
<table border="1" cellspacing=1 cellpadding=0 bordercolor="red" height="12" width="141" background="Images/bar.Jpg" style="top: -3; position:relative">
<tr><td><IMG src="Images/blockImg.jpg" style="HEIGHT:10px; LEFT:0px; TOP:0px; WIDTH:12px; position:relative"></td></tr>
</table>
<table border="1" cellspacing=1 cellpadding=0 bordercolor="Green" height="12" width="141" background="Images/bar.Jpg" style="top:0; position:relative">
<tr><td><IMG src="Images/blockImg.jpg" style="HEIGHT:10px; LEFT:0px; TOP:0px; WIDTH:12px; position:relative"></td></tr>
</table>
<table border="1" cellspacing=1 cellpadding=0 bordercolor="Blue" height="12" width="141" background="Images/bar.Jpg" style="top:3; position:relative">
<tr><td><IMG src="Images/blockImg.jpg" style="HEIGHT:10px; LEFT:0px; TOP:0px; WIDTH:12px; position:relative"></td></tr>
</table>
</td></tr>
</table>
<!-- End DivColorPri -->
</body>
</html>
Si y a quelqu'un qui a un commentaire ou une suggestion qui ne ce géne pas.
A voir également:
- DHTML Et Netscape 4.78
- Dhtml menu - Télécharger - Divers Web & Internet