Je me suis essayé à la propriété visibility d'un bloc... sans erreur dans la console, ni résultat à l'écran. Ce que je demande est t'il réalisable dans l'état ? Mal réalisé ?
A l'appel de la fonction visant à cacher le div menu, l'alert est executée correctement. mais rien n'est masqué pour autant.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <link rel="StyleSheet" href="/css/menu.css" type="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Ma page</title> <script type="text/javascript"> <!-- function cacheId(baliseId) { if (document.getElementById && document.getElementById(baliseId) != null) { alert('Je masque ' + baliseId); document.getElementById(baliseId).style.visibility='hidden'; document.getElementById(baliseId).style.display='none'; } } //--> </script> </head> </body> <table width="900" height="540" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="navy"> <tr> <td width='352' height='40'><img src="/usr/img/titre.jpg"></td> <td width='548' height='40'> <a href='#' onclick="cacheId('menu');">cacher menu</a> </td> </tr> <tr><div id='menu'> <td width='352' height='500' bgcolor="#91A3C4"><iframe width='352' height='500' name='menu' src='menu.php'></iframe></td></div> <td width='*' height='500' bgcolor="#B4BFD6"><iframe bgcolor='#B4BFD6' width='548' height='500' name='main' src='/usr/motd.php'></iframe></td> </tr> </table> </body> </html>
J'ai essayé avec un <div> minimaliste, ca a fonctionné.
Merci pour vos lumières.
Séb.
Partager