begin process at 2012 05 28 07:37:51
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Cookies

 > AFFICHEZ SUR VOTRE SITE UNE FAUSSE POPUP EN DHTML TOTALEMENT PARAMETRABLE !

AFFICHEZ SUR VOTRE SITE UNE FAUSSE POPUP EN DHTML TOTALEMENT PARAMETRABLE !


 Information sur la source

Note :
5 / 10 - par 4 personnes
5,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Cookies Niveau :Débutant Date de création :15/06/2003 Date de mise à jour :15/06/2003 03:01:04 Vu :16 622

Auteur : DeViLy

Ecrire un message privé
Site perso
Commentaire sur cette source (5)
Ajouter un commentaire et/ou une note

 Description

A mettre entre les balises <HEAD> et </HEAD>, une seule fois, même si vous desirez afficher plusieurs popups sur la même page :

<script language="javascript" src="ejs_popup.js"></SCRIPT>


A mettre dans un fichier nommé ejs_popup.js, dans le même repertoire que votre page :

var IE5=(document.getElementById && document.all)? true : false;
var W3C=(document.getElementById)? true: false;
var currIDb=null, currIDs=null, xoff=0, yoff=0; zctr=0; totz=0;
function trackmouse(evt){
if((currIDb!=null) && (currIDs!=null)){
var x=(IE5)? event.clientX+document.body.scrollLeft : evt.pageX;
var y=(IE5)? event.clientY+document.body.scrollTop : evt.pageY;
currIDb.style.left=x+xoff+'px';
currIDs .style.left=x+xoff+10+'px';
currIDb.style.top=y+yo ff+'px';
currIDs.style.top=y+yoff+10+'px';
return false;
}}
function stopdrag(){
currIDb=null;
currIDs=null;
NS6bugfix( );
}
function grab_id(evt){
xoff=parseInt(this.IDb.style.left)-( (IE5)? event.clientX+document.body.scrollLeft : evt.pageX);
yoff=parseInt(this.IDb.style.top)-((IE 5)? event.clientY+document.body.scrollTop : evt.pageY);
currIDb=this.IDb;
currIDs=this.IDs;
}
function NS6bugfix(){
if(!IE5){
self.resizeBy(0,1);
self.re sizeBy(0,-1);
}}
function incrzindex(){
zctr=zctr+2;
this.subb.style.zIndex= zctr;
this.subs.style.zIndex=zctr-1;
}
function createPopup(id, title, width, height, x , y , isdraggable, boxcolor, barcolor, shadowcolor, text, textcolor, textptsize, textfamily, titlecolor ){
if(W3C){
zctr+=2;
totz=zctr;
var txt='';
txt+='<div id="'+id+'_s" style="position:absolute; left:'+(x+10)+'px; top:'+(y+10)+'px; width:'+width+'px; height:'+height+'px; background-color:'+shadowcolor+'; filter:alpha(opacity=50); visibility:visible"> </div>';
txt+='<div id="'+id+'_b" style="border:outset '+barcolor+' 2px; position:absolute; left:'+x+'px; top:'+y+'px; width:'+width+'px; overflow:hidden; height:'+height+'px; background-color:'+boxcolor+'; visibility:visible">';
txt+='<div style="width:'+width+'px; height:16px; background-color:'+barcolor+'; padding:0px; border:1px"><table cellpadding="0" cellspacing="0" border="0" width="'+(IE5? width-4 : width)+'"><tr><td width="'+(width-20)+'"><div id="'+id+'_h" style="width:'+(width-20)+'px; height:14px; font: bold 12px Arial; color:'+titlecolor+'"> '+title+'</div></td><td align="right"><a onmousedown="document.getElementById(\''+id+'_s\') .style.display=\'none\'; document.getElementById(\''+id+'_b\').style.displa y=\'none\';return false"><img src="closeb.gif" border="0" height="15" width="15"></a></td></tr>< /table></div>';
txt+='<div id="'+id+'_ov" width:'+width+'px; style="margin:2px; color:'+textcolor+'; font:'+textptsize+'pt '+textfamily+';">'+text+'</div></div&g t;';
document.write(txt);
this.IDh=document.getEle mentById(id+'_h');
this.IDh.IDb=document.getElemen tById(id+'_b');
this.IDh.IDs=document.getElementBy Id(id+'_s');
this.IDh.IDb.subs=this.IDh.IDs;
this. IDh.IDb.subb=this.IDh.IDb;
this.IDh.IDb.IDov=docum ent.getElementById(id+'_ov');
if(IE5){
this.IDh.ID b.IDov.style.width=width-6;
this.IDh.IDb.IDov.styl e.height=height-22;
this.IDh.IDb.IDov.style.scroll barBaseColor=boxcolor;
this.IDh.IDb.IDov.style.ove rflow="auto";
}else{
this.IDh.IDs.style.MozOpacity =.5;
}
this.IDh.IDb.onmousedown=incrzindex;
if(isd raggable){
this.IDh.onmousedown=grab_id;
this.IDh. onmouseup=stopdrag;
}}}
if(W3C)document.onmousemov e=trackmouse;
if(!IE5 && W3C)window.onload=NS6bugfix;


A mettre entre les balises <BODY> et </BODY>, où vous le désirez :

<script language="javascript">
createPopup( 'b1055638564107', 'Bienvenue !' , 150, 75, 150, 200, true,  '#FFFFFF' , '#006699' , 'black' ,  'Salut !' , '#FFFFFF'  , 8 , 'Verdana','#FFFFFF');
</script>




 Sources du même auteur

JAVASCRIPT

 Sources de la même categorie

Source avec Zip LES COOKIES ET JAVASCRIPT par Zestyr
COOKIES EN JAVASCRIPT par CodeurleGeek
Source avec Zip MULTI-BLOC-NOTE(AVEC COOKIES!) par DomJ
Source avec Zip LES VINGTS JOLIS COOKIES par cornofulgur
Source avec Zip AJOUTER, SUPPRIMER, LIRE COOKIE! par DomJ

Commentaires et avis

Commentaire de mathieumg le 15/06/2003 03:21:11

Des commentaires auraient été intéressants et aussi le fait de mentionner que cela vient de www.editeurjavascript.com

Merci

Mathieu M-G

Commentaire de Albert5 le 16/06/2003 08:48:41

C'est clair !

Commentaire de pyroflo le 16/06/2003 13:30:08

Et mettre le code dans la partie qui lui est réservée comme ça il aurait été colorisé....

Commentaire de vasty le 07/07/2008 18:01:49

ça marche pas chez moi (sur ie et firefox). j ai activé JS sur les deux browsers quand meme. une suggestion de quelqu'un???

Commentaire de OL69OL69 le 17/02/2009 23:28:22

c koi comme truc sa ? c HTLM ou JAVASCRIPT ?

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,546 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales