Franc83


Dhtml animé Convertir en PDF Version imprimable
25-06-2008

LE DHTML EN ACTION

Le DHTML est une technique qui allie dans le meme corps, le javascript pour les actions, les feuilles de style pour la presentation, et le code html pour l'architecture....

Il est assez etonnant de voir ce qui est permis avec l'association de ces trois langages, et la page devient vivante et attractive.
il vous suffit simplement de regarder le code source de la page pour voir comment elle se structure et comment s'imbriquent les differents langages et comment ils inter-agissent.



Le DHTML, du html dynamique, mêlant javascript, css, et code html, donne des résultats réjouissants.....

Il suffit juste d'étudier d'un peu près la structure de la page, dans le code source, pour comprendre le fonctionnement de cette association de languages, sachant qu'il est préférable d'avoir la stylesheet ou feuille de style, et le fichier javascript, dans des fichiers externes, avec un appel dans le header de la page elle même.

Voyez ici l'effet que rend un module en dhtml :


Cliquez ici pour voir le module dhtml

Voici le lien pour le fichier texte du code html pour le module. Il vous suffit de voir le code source de la page.


Pour voir le code de la page en popup... Cliquez ici
<script type="text/javascript" >
n = (document.layers) ? 1:0
ie = (document.all) ? 1:0
function init() {
pulloutActive = 0
if (n) {
pullout1 = document.pulloutInterface.document.pulloutContent.document.pulloutContent1
pullout2 = document.pulloutInterface.document.pulloutContent.document.pulloutContent2
pullout3 = document.pulloutInterface.document.pulloutContent.document.pulloutContent3
pullout4 = document.pulloutInterface.document.pulloutContent.document.pulloutContent4
pullout5 = document.pulloutInterface.document.pulloutContent.document.pulloutContent5
pullout6 = document.pulloutInterface.document.pulloutContent.document.pulloutContent6
pullout7 = document.pulloutInterface.document.pulloutContent.document.pulloutContent7
}
if (ie) {
pullout1 = pulloutContent1.style
pullout2 = pulloutContent2.style
pullout3 = pulloutContent3.style
pullout4 = pulloutContent4.style
pullout5 = pulloutContent5.style
pullout6 = pulloutContent6.style
pullout7 = pulloutContent7.style
}
pulloutShown = pullout1 // the layer that is currently shown
pulloutShown.xpos = 0
pulloutNew = "none" // the layer that we will be shown next
pulloutNew.xpos = -400
}
// Pullout Function, starts the sequence
function pullout(which) {
if (!pulloutActive && pulloutShown != which) {
pulloutActive = 1 // this makes it so you can't start it again until it's finished
pulloutNew = which
pulloutNew.xpos = -400
pulloutLeft()
}
}
// Slide the old layer out of view
function pulloutLeft() {
if (pulloutShown.xpos > -400) {
pulloutShown.xpos -= 15
pulloutShown.left = pulloutShown.xpos
setTimeout("pulloutLeft()",30)
}
else {
hide(pulloutShown)
show(pulloutNew)
setTimeout("pulloutRight()",50)
}
}
// Slide the new layer into view
function pulloutRight() {
if (pulloutNew.xpos < 0) {
pulloutNew.xpos += 15
pulloutNew.left = pulloutNew.xpos
setTimeout("pulloutRight()",30)
}
else {
pulloutShown = pulloutNew
pulloutActive = 0 // stops the sequence
}
}
// Show/Hide Functions
function show(showobj) {
if (n) showobj.visibility = "show"
if (ie) showobj.visibility = "visible"
}
function hide(hideobj) {
if (n) hideobj.visibility = "hide"
if (ie) hideobj.visibility = "hidden"
}
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style text="text/css">
body {background-color:#FFFFFF; margin:opx; padding:0px; }
p { font-family: 'Verdana'; color:#000000 ; font-size:1em; }
br { font-family: 'Verdana'; color:#000000 ; font-size:1.3em; }
h1 { font-family: 'Verdana'; color:#000000 ; font-size:150%; align:center;} /*titre des pages*/
h6 { font-family: 'Verdana'; color:#000000 ; font-size:140% ; }
h5 { font-family: 'Verdana'; color:#000000 ; font-size:130% ; }
h4 { font-family: 'Verdana'; color:#000000 ; font-size:120% ; }
h3 { font-family: 'Verdana'; color:#000000 ; font-size:100%; } #pulloutInterface {position:relative; left:0px; top:0px; width:600px; height:250px; clip:rect(0,700,250,0); background-color:#0000FF; layer-background-color:#0000FF; visibility:visible;}
#pulloutSidebar1 {
position:absolute;
left:5px;
top:5px;
width:100px;
height:30px;
clip:rect(0,100,30,0);
background-color:#DDDDDD;
visibility: visible;
}
#pulloutSidebar2 {
position:absolute;
left:5px;
top:40px;
width:100px;
height:30px;
clip:rect(0,100,30,0);
background-color:#DDDDDD;
visibility: visible;
}
#pulloutSidebar3 {
position:absolute;
left:5px;
top:75px;
width:100px;
height:30px;
clip:rect(0,100,30,0); visibility: visible;
}
#pulloutSidebar4 {
position:absolute;
left:5px;
top:110px;
width:100px;
height:30px;
clip:rect(0,100,30,0); visibility: visible;
}
#pulloutSidebar5 {
position:absolute;
left:5px;
top:145px;
width:100px;
height:30px;
clip:rect(0,100,30,0); visibility: visible;
}
#pulloutSidebar6 {
position:absolute;
left:5px;
top:180px;
width:100px;
height:30px;
clip:rect(0,100,30,0);
;
visibility: visible;
}
#pulloutSidebar7 {
position:absolute;
left:5px;
top:215px;
width:100px;
height:30px;
clip:rect(0,100,30,0);
visibility: visible;
}
#pulloutContent {
position:absolute;
left:110px;
top:5px;
width:484px;
height:248px;
clip:rect(0,785,240,0);
background-color:#00006F;
layer-background-color:#00006F;
visibility: visible;
}
#pulloutContent1 {
position:absolute;
left:0px;
top:0px;
width:481px;
height:240px;
clip:rect(0,585,240,0);
background-color:#00006F;
layer-background-color:#FFFFFF;
z-index:1 ;
visibility: visible;
}
#pulloutContent2 {
position:absolute;
left:-400px;
top:0px;
width:478px;
height:240px;
clip:rect(0,585,240,0);

layer-background-color:#FFFFFF;
visibility: visible;
}
#pulloutContent3 {
position:absolute;
left:-400px;
top:0px;
width:478px;
height:240px;
clip:rect(0,585,240,0);

layer-background-color:#FFFFFF;
visibility: visible;
}
#pulloutContent4 {
position:absolute;
left:-400px;
top:0px;
width:478px;
height:240px;
clip:rect(0,585,240,0);

layer-background-color:#FFFFFF;
visibility: visible;
}
#pulloutContent5 {
position:absolute;
left:-400px;
top:0px;
width:478px;
height:240px;
clip:rect(0,585,240,0);

layer-background-color:#FFFFFF;
visibility: visible;
}
#pulloutContent6 {
position:absolute;
left:-400px;
top:0px;
width:478px;
height:264px;
clip:rect(0,585,240,0);

layer-background-color:#FFFFFF;
visibility: visible;
}
#pulloutContent7 {
position:absolute;
left:-400px;
top:0px;
width:478px;
height:240px;
clip:rect(0,585,240,0);

layer-background-color:#FFFFFF;
visibility: visible;
}
</style>
</head>
<body onload=init()> <div>
<DIV ID="pulloutInterface">
<DIV ID="pulloutSidebar1">
<P ALIGN=CENTER><A HREF="javascript:pullout(pullout1)"><img onmouseover="javascript:this.src='http://www.franc83.fr/dhtml/img/yeux2.gif'"
onmouseout="javascript:this.src='http://www.franc83.fr/dhtml/img/balain.jpg'"
src="http://www.franc83.fr/dhtml/img/balain.jpg" width="110px" height="30px" border="0px" alt="fiche d'Alain"/></A></P>
</DIV>
<DIV ID="pulloutSidebar2">
<P ALIGN=CENTER><A HREF="javascript:pullout(pullout2)"><img onmouseover="javascript:this.src='http://www.franc83.fr/dhtml/img/yeux2.gif'"
onmouseout="javascript:this.src='http://www.franc83.fr/dhtml/img/brene.jpg'"
src="http://www.franc83.fr/dhtml/img/brene.jpg" width="110px" height="30px" border="0px" alt="fiche de René"/></A></P>
</DIV>
<DIV ID="pulloutSidebar3">
<P ALIGN=CENTER><A HREF="javascript:pullout(pullout3)"><img onmouseover="javascript:this.src='http://www.franc83.fr/dhtml/img/yeux2.gif'"
onmouseout="javascript:this.src='http://www.franc83.fr/dhtml/img/bted.jpg'"
src="http://www.franc83.fr/dhtml/img/bted.jpg" width="110px" height="30px" border="0px" alt="fiche de Teddy"/></A></P>
</DIV>
<DIV ID="pulloutSidebar4">
<P ALIGN=CENTER><A HREF="javascript:pullout(pullout4)"><img onmouseover="javascript:this.src='http://www.franc83.fr/dhtml/img/yeux2.gif'"
onmouseout="javascript:this.src='http://www.franc83.fr/dhtml/img/bvincent.jpg'"
src="http://www.franc83.fr/dhtml/img/bvincent.jpg" width="110px" height="30px" border="0px" alt="fiche de Vincent"/></A></P>
</DIV>
<DIV ID="pulloutSidebar5">
<P ALIGN=CENTER><A HREF="javascript:pullout(pullout5)"><img onmouseover="javascript:this.src='http://www.franc83.fr/dhtml/img/yeux2.gif'"
onmouseout="javascript:this.src='http://www.franc83.fr/dhtml/img/bmonk.jpg'" src="http://www.franc83.fr/dhtml/img/bmonk.jpg" width="110px" height="30px" border="0px" alt="fiche de Olivier"/></A></P>
</DIV>
<DIV ID="pulloutSidebar6">
<P ALIGN=CENTER><A HREF="javascript:pullout(pullout6)"><img onmouseover="javascript:this.src='http://www.franc83.fr/dhtml/img/yeux2.gif'"
onmouseout="javascript:this.src='http://www.franc83.fr/dhtml/img/bjenlain.jpg'"
src="http://www.franc83.fr/dhtml/img/bjenlain.jpg" width="110px"
height="30px" border="0px" alt="fiche de Jenlain"/></A></P>
</DIV>
<DIV ID="pulloutSidebar7">
<P ALIGN=CENTER><A HREF="javascript:pullout(pullout7)"><img onmouseover="javascript:this.src='http://www.franc83.fr/dhtml/img/yeux2.gif'"
onmouseout="javascript:this.src='http://www.franc83.fr/dhtml/img/bgroupe.jpg'"
src="http://www.franc83.fr/dhtml/img/bgroupe.jpg" width="110px"
height="30px" border="0px" alt="Photo du Groupe"/></A></P>
</DIV>
<DIV ID="pulloutContent">
<DIV ID="pulloutContent1">
<P ALIGN="CENTER"><STRONG><BR>
</STRONG>
<TABLE BORDER="0px" WIDTH="400px" height="181px" >
<TD width="400px"> <P><img src="http://www.franc83.fr/dhtml/img/ficheal.jpg" width="400px"
height="181px" border="0px" alt="fiche d'Alain" />
</TD>
</TABLE></P>
</DIV>
<DIV ID="pulloutContent2">
<P ALIGN="CENTER"><STRONG><BR>
</STRONG>
<TABLE BORDER="0px" WIDTH="400px">
<TD width="400px"><P><img src="
http://www.franc83.fr/dhtml/img/rene.jpg" width="400px"
height="181px" border="0px" alt="fiche de René" />
</TD>
</TABLE></P>
</DIV>
<DIV ID="pulloutContent3">
<P ALIGN="CENTER"><STRONG><BR>
</STRONG>
<TABLE BORDER="0px" WIDTH="400px">
<TD width="400"><P><img src="
http://www.franc83.fr/dhtml/img/teddy.jpg" width="400px"
height="181px"
border="0" alt="fiche de Teddy" />
</TD>
</TABLE></P>
</DIV>
<DIV ID="pulloutContent4">
<P ALIGN="CENTER"><STRONG><BR>
</STRONG>
<TABLE BORDER=0 WIDTH=400>
<TD width="400px"><P><img src="http://www.franc83.fr/dhtml/img/vincent.jpg" width="400px" height="181px"
border="0px" alt="fiche de Vincent" />
</TD>
</TABLE></P>
</DIV>
<DIV ID="pulloutContent5">
<P ALIGN="CENTER"><STRONG><br />
</STRONG>
<table border="0px" width="400px" height="181px">
<td width="400px" height="181px"> <p><img src="
http://www.franc83.fr/dhtml/img/olivier.jpg" width="400px" height="181px"
border="0px" alt="fiche de Olivier" />
</td>
</table></P>
</DIV>
<DIV ID="pulloutContent6">
<P ALIGN="CENTER"><STRONG><BR>
</STRONG>
<table border=0 width="400px" height="181px">
<td width="400px" height="181px"><P><img src="
http://www.franc83.fr/dhtml/img/jenlain.jpg" width="400px" height="181px"
border="0px" alt="fiche de Jenlain" />
</TD>
</TABLE></P>
</DIV>
<DIV ID="pulloutContent7">
<P ALIGN="CENTER"><STRONG><BR>
</STRONG>
<table border="0px" width="400px" height="181px">
<td width="400px" height="181px"><P><img src="
http://www.franc83.fr/dhtml/img/ocsab.jpg" width="400px" height="181px"
border="0px" alt="Photo du Groupe" />
</TD>
</TABLE></P>
</DIV>
</DIV>
<div id="Layer1" style="position:absolute; width:40px; height:238px; z-index:5; left: 110px; top: 7px;background-color:#00006F"></div>
</DIV>
</div>
</body>
</html>

Powered By PageCache
Generated in 0.53692 Seconds

Amusez vous! ! ! !

Albidochon......


Dans le même esprit



Citez cet article

  Commenter cet article

Commenter
  • Les messages comportant des attaques verbales contre les personnes seront supprimés.
  • Vous pouvez renouveler le code de sécurité en appliquant un rafraîchissement à votre navigateur.
  • Appliquer cette méthode de rafraîchissement si vous avez entré un mauvais code de sécurité.
Nom
E-mail
Site web
Titre
BBCode:Web AddressEmail AddressBold TextItalic TextUnderlined TextQuoteCodeOpen ListList ItemClose List
Commentaire



Code:* Code
Je désire être prévenu par mail des commentaires qui suivront

Powered by AkoComment Tweaked Special Edition v.1.4.6
AkoComment © Copyright 2004 by Arthur Konze - www.mamboportal.com
All right reserved

 
< Précédent   Suivant >

Liens amis

Compteur.org

e-dilik.fr

NetFox2.net

IgloOps.fr

Infostuces

Mixx Radio Gold

Mobile Astuces

-------------

Votre site ici

Notre logo

Aide et astuces pour  blogs

Cliquez droit dans la zone où se trouve le code html et "copier"


Nos autres Logos...

S'abonner

devenir amis sur facebook

Votre adresse email ici pour recevoir les nouveautés du site directement dans votre boite

Nos Gadgets

Installez nos gadgets

gratuits Live Spaces

albi-gadget.jpg

Albidochon

oeil2moscou.jpg

Oeil 2 Moscou

Aidez-nous

aidez-nous

Recommandez ce
site à un ami

Statistiques

Powered By PageCache
Generated in 0.53692 Seconds