begin process at 2012 05 28 10:04:01
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Fenêtre & Pop-up

 > FAUSSE POPUP DHTML 100% SEMBLABLE AUX VRAIES (APPARENCE ET FONCTIONNALITÉS)

FAUSSE POPUP DHTML 100% SEMBLABLE AUX VRAIES (APPARENCE ET FONCTIONNALITÉS)


 Information sur la source

Note :
8 / 10 - par 6 personnes
8,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Fenêtre & Pop-up Classé sous :fausse, popup, dhtml Niveau :Débutant Date de création :04/02/2006 Date de mise à jour :04/02/2006 12:35:59 Vu / téléchargé :25 662 / 3 187

Auteur : NEVERFORGET

Ecrire un message privé
Ce membre participe au partage de revenus publicitaires
Commentaire sur cette source (9)
Ajouter un commentaire et/ou une note


 Description

Cliquez pour voir la capture en taille normale
J'ai enfin trouvé et amélioré un script qui représente une fausse popup DHTML en tous points semblable (apparence et fonctionnalités) aux vraies. Vous avez même la possibilité d'ajouter votre logo en haut de la fenêtre à gauche (fichier icon, ligne 114)et un texte d'explication ou de pub(ligne 91). Inutile de dire qu'elle n'est pas bloquée par les systèmes habituels de blocage de fenêtres publicitaires intempestives. Alors usez-en sans en abuser. Tout est dans le zip. Bonne prog à tous.

Source

  • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  • "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  • <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  • <head>
  • <title>Fausse popup DHTML</title>
  • <style type="text/css">
  • #windowContainer {
  • position:absolute;
  • top:10px;
  • left:10px;
  • background-color:#C0C0C0;
  • border-style:solid;
  • border-width:1px;
  • border-top-color:#E0E0E0;
  • border-left-color:#E0E0E0;
  • width:300px;
  • height:300px;
  • }
  • #windowContainerBorder1 {
  • position:absolute;
  • top:0px;
  • left:0px;
  • width:298px;
  • height:298px;
  • border-style:solid;
  • border-width:1px;
  • border-top-color:#FFFFFF;
  • border-left-color:#FFFFFF;
  • border-bottom-color:#808080;
  • border-right-color:#808080;
  • }
  • #windowTitle {
  • position:absolute;
  • top:3px;
  • left:3px;
  • width:292px;
  • height:18px;
  • background-color:#000080;
  • font-family:ms sans serif;
  • font-size:8pt;
  • padding-left:2px;
  • font-weight:bold;
  • color:#FFFFFF;
  • cursor:default;
  • vertical-align:middle;
  • filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#000080', EndColorStr='#96C8FF');
  • }
  • #controlBox {
  • position:absolute;
  • top:5px;
  • left:243px;
  • }
  • body {
  • background-color:#FFFFFF;
  • }
  • #contentArea {
  • position:absolute;
  • padding:5px;
  • top:23px;
  • left:3px;
  • width:282px;
  • height:250px;
  • background-color:#FFFFFF;
  • border-style:inset;
  • border-width:2px;
  • overflow:auto;
  • }
  • #resizeCapture {
  • position:absolute;
  • top:287px;
  • left:286px;
  • width:12px;
  • height:12px;
  • cursor:nw-resize;
  • background-image:url("resizeArea.gif");
  • overflow: hidden;
  • }
  • </style>
  • <script language="javascript" type="text/javascript">
  • var WIN_HEIGHT = 300;
  • var WIN_WIDTH = 300;
  • var WIN_TITLE = "- Informations";
  • var WIN_TOP = 10;
  • var WIN_LEFT = 10;
  • var y,x;
  • var mDown = false;
  • var mResize = false;
  • var originalWidth = WIN_WIDTH;
  • var originalHeight = WIN_HEIGHT;
  • var originalTop = WIN_TOP;
  • var originalLeft = WIN_LEFT;
  • var isMaximized = false, isMinimized = false;
  • function init() {
  • if(document.all)document.body.style.height = "100%";
  • document.getElementById("windowContainer").style.height = WIN_HEIGHT;
  • document.getElementById("windowContainer").style.width = WIN_WIDTH;
  • document.getElementById("windowContainer").style.top = WIN_TOP;
  • document.getElementById("windowContainer").style.left = WIN_LEFT;
  • document.getElementById("windowTitle").innerHTML ="<img align=middle src=\"icon.gif\"> " + WIN_TITLE;
  • // event handlers
  • if(!document.all)document.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN | Event.MOUSEUP);
  • document.onmousedown=handleMouseDownEvents;
  • document.onmousemove=handleMouseMoveEvents
  • document.onmouseup=handleMouseUpEvents;
  • document.getElementById("windowTitle").onmouseup = windowTitleMouseUp
  • document.getElementById("windowTitle").onmousedown = windowTitleMouseDown;
  • document.getElementById("resizeCapture").onmousedown = resizeCaptureOnMouseDown;
  • }
  • function resizeCaptureOnMouseDown(e) {
  • mResize=true;
  • captureClientXY(e);
  • }
  • function windowTitleMouseUp() {
  • mDown = false;
  • }
  • function windowTitleMouseDown(e) {
  • mDown=true;
  • captureOffsetXY(e);
  • }
  • function initDrag(e) {
  • if(!mDown)return;
  • if(document.all) {
  • x2 = window.event.clientX-(x+5);
  • y2 = window.event.clientY-(y+5);
  • } else {
  • x2 = e.clientX - (x+5);
  • y2 = e.clientY - (y+5);
  • }
  • document.getElementById("windowContainer").style.top = y2 + "px";
  • document.getElementById("windowContainer").style.left = x2 + "px";
  • originalLeft = x2;
  • originalTop = y2;
  • }
  • function doResize(nX,nY) {
  • nWidth = nX - x;
  • nHeight = nY- y;
  • cWidth = originalWidth; cHeight = originalHeight;
  • cWidth+=nWidth; cHeight+=nHeight;
  • if(cWidth<=75 || cHeight <= 75) return;
  • document.getElementById("windowContainer").style.width = cWidth + "px";
  • document.getElementById("windowContainer").style.height = cHeight + "px";
  • //resize/move children
  • document.getElementById("windowTitle").style.width = (cWidth -8) + "px";
  • document.getElementById("windowContainerBorder1").style.width = (cWidth - 2) + "px";
  • document.getElementById("windowContainerBorder1").style.height = (cHeight-2) + "px";
  • document.getElementById("contentArea").style.width = (cWidth-18) + "px";
  • document.getElementById("contentArea").style.height = (cHeight-50) + "px";
  • document.getElementById("resizeCapture").style.top = (cHeight-13) + "px";
  • document.getElementById("resizeCapture").style.left = (cWidth-13) + "px";
  • document.getElementById("controlBox").style.left = (cWidth - 57) + "px";
  • }
  • function handleMouseUpEvents() {
  • if(mDown) {
  • mDown=false;
  • return;
  • }
  • if(mResize) {
  • mResize=false;
  • document.body.style.cursor = "default";
  • originalWidth = parseInt(document.getElementById("windowContainer").style.width);
  • originalHeight = parseInt(document.getElementById("windowContainer").style.height);
  • }
  • }
  • function doClose() {
  • document.getElementById("windowContainer").style.display = "none";
  • }
  • function doMinimize() {
  • if(!isMinimized) {
  • markCoordinates();
  • document.getElementById("windowContainer").style.height = 24 + "px";
  • minTop = document.all?document.body.clientHeight:window.innerHeight;
  • document.getElementById("windowContainer").style.top = (minTop-25) + "px";
  • document.getElementById("contentArea").style.display = "none";
  • document.getElementById("windowContainerBorder1").style.display = "none";
  • document.getElementById("resizeCapture").style.display = "none";
  • isMinimized = true;
  • } else {
  • document.getElementById("windowContainer").style.top = originalTop + "px";
  • document.getElementById("windowContainer").style.left = originalLeft + "px";
  • document.getElementById("windowContainer").style.height = originalHeight + "px";
  • document.getElementById("contentArea").style.display = "block";
  • document.getElementById("windowContainerBorder1").style.display = "block";
  • document.getElementById("resizeCapture").style.display = "block";
  • isMinimized = false;
  • }
  • }
  • function doMaximize() {
  • x=0;y=0;
  • if(!isMaximized) {
  • markCoordinates();
  • document.getElementById("windowContainer").style.top = 0;
  • document.getElementById("windowContainer").style.left = 0;
  • doResize(screen.width - originalWidth,screen.height - originalHeight);
  • document.getElementById("contentArea").style.display = "block";
  • document.getElementById("windowContainerBorder1").style.display = "block";
  • document.getElementById("resizeCapture").style.display = "block";
  • isMaximized = true;
  • } else {
  • doResize(0,0);
  • isMaximized = false;
  • document.getElementById("windowContainer").style.top = originalTop + "px";
  • document.getElementById("windowContainer").style.left = originalLeft + "px";
  • }
  • }
  • function handleMouseDownEvents(e) {
  • if(mResize) {
  • document.body.style.cursor = "nw-resize";
  • }
  • }
  • function markCoordinates() {
  • originalLeft = parseInt(document.getElementById("windowContainer").style.left);
  • originalTop = parseInt(document.getElementById("windowContainer").style.top);
  • }
  • function handleMouseMoveEvents(e) {
  • if(mDown) {
  • initDrag(e);
  • return;
  • }
  • if(mResize) {
  • if(document.all) {
  • doResize(window.event.clientX,window.event.clientY);
  • } else {
  • doResize(e.clientX,e.clientY);
  • }
  • }
  • }
  • function captureOffsetXY(e) {
  • if(document.all) {
  • x=window.event.offsetX;
  • y=window.event.offsetY
  • } else {
  • x = e.pageX - e.clientX;
  • y = e.pageY - e.clientY;
  • }
  • }
  • function captureClientXY(e) {
  • if(document.all) {
  • x = window.event.clientX;
  • y = window.event.clientY;
  • } else {
  • x = e.clientX;
  • y = e.clientY;
  • }
  • }
  • </script>
  • <map name="ctrlBox">
  • <area alt="Minimize" title="Minimize" coords="1,0,16,15" href="javascript:doMinimize();">
  • <area alt="Maximize" title="Maximize" coords="16,0,34,16" href="javascript:doMaximize();">
  • <area alt="Close" title="Close" coords="33,0,53,16" href="javascript:doClose();"">
  • </map>
  • </head>
  • <body onload="init();">
  • <div id="windowContainer" unselectable=on>
  • <div id="windowContainerBorder1"></div>
  • <div onSelect="return false" id="windowTitle"></div>
  • <div id="controlBox"><img src="control_box.gif" width="52" height="15" border="0" usemap="#ctrlBox" /></div>
  • <div id="contentArea">
  • <h1><u>Sites de référence :</u></h1>
  • <table width="10" border="0">
  • <tr>
  • <td>&#8226;</td>
  • <td><a href="http://www.fitline-wellness2.info" target="_blank"><img src="../../../../../a_worldsoft/Clients/www.fitline-wellness2.info/Logo%20Fitline.jpg" width="100" height="63" border="0" /></a></td>
  • </tr>
  • </table>
  • <table width="10" border="0">
  • <tr>
  • <td>&#8226;</td>
  • <td><a href="http://www.kv-architecture.ch" target="_blank"><img src="file:///C|/a_worldsoft/Clients/www.kv-architecture.ch/images/kv-architecture%20titre.gif" width="258" height="28" border="0" /></a></td>
  • </tr>
  • </table>
  • <table width="214" border="0">
  • <tr>
  • <td width="9" height="62">&#8226;</td>
  • <td width="195"><p><strong><font color="#A27D2B" size="4" face="Verdana, Arial, Helvetica, sans-serif">Votre futur
  • site</font></strong><br />
  • <a href="mailto:christian.deforel@gmx.ch">&eacute;crivez-moi pour
  • plus de d&eacute;tails</a></p></td>
  • </tr>
  • </table>
  • <p><font size="4"> </font> </p>
  • </div>
  • <div id="resizeCapture"></div>
  • </div>
  • </body>
  • </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Fausse popup DHTML</title>
<style type="text/css">
#windowContainer {
	position:absolute;
	top:10px;
	left:10px;
	background-color:#C0C0C0;
	border-style:solid;
	border-width:1px;
	border-top-color:#E0E0E0;
	border-left-color:#E0E0E0;
	width:300px;
	height:300px;
}

#windowContainerBorder1 {
	position:absolute;
	top:0px;
	left:0px;
	width:298px;
	height:298px;
	border-style:solid;
	border-width:1px;
	border-top-color:#FFFFFF;
	border-left-color:#FFFFFF;
	border-bottom-color:#808080;
	border-right-color:#808080;
}

#windowTitle {
	position:absolute;
	top:3px;
	left:3px;
	width:292px;
	height:18px;
	background-color:#000080;
	font-family:ms sans serif;
	font-size:8pt;
	padding-left:2px;
	font-weight:bold;
	color:#FFFFFF;
	cursor:default;
	vertical-align:middle;
	filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#000080', EndColorStr='#96C8FF');
}


#controlBox {
	position:absolute;
	top:5px;
	left:243px;
}

body {
	background-color:#FFFFFF;
}

#contentArea {
	position:absolute;
	padding:5px;
	top:23px;
	left:3px;
	width:282px;
	height:250px;
	background-color:#FFFFFF;
	border-style:inset;
	border-width:2px;
	overflow:auto;
}

#resizeCapture {
	position:absolute;
	top:287px;
	left:286px;
	width:12px;
	height:12px;
	cursor:nw-resize;
	background-image:url("resizeArea.gif");
	overflow: hidden;
}

</style>

<script language="javascript" type="text/javascript">
var WIN_HEIGHT = 300;
var WIN_WIDTH = 300;
var WIN_TITLE = "- Informations";
var WIN_TOP  = 10;
var WIN_LEFT = 10;


var y,x;
var mDown = false;
var mResize = false;

var originalWidth = WIN_WIDTH;
var originalHeight = WIN_HEIGHT;
var originalTop = WIN_TOP;
var originalLeft = WIN_LEFT;

var isMaximized = false, isMinimized = false;

function init() {
	if(document.all)document.body.style.height = "100%";
	document.getElementById("windowContainer").style.height = WIN_HEIGHT;
	document.getElementById("windowContainer").style.width = WIN_WIDTH;
	document.getElementById("windowContainer").style.top = WIN_TOP;
	document.getElementById("windowContainer").style.left = WIN_LEFT;

	document.getElementById("windowTitle").innerHTML ="<img align=middle src=\"icon.gif\"> " +  WIN_TITLE;

	// event handlers
	if(!document.all)document.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN | Event.MOUSEUP);
	document.onmousedown=handleMouseDownEvents;
	document.onmousemove=handleMouseMoveEvents
	document.onmouseup=handleMouseUpEvents;
	document.getElementById("windowTitle").onmouseup = windowTitleMouseUp
	document.getElementById("windowTitle").onmousedown = windowTitleMouseDown;
	document.getElementById("resizeCapture").onmousedown  = resizeCaptureOnMouseDown; 
}

function resizeCaptureOnMouseDown(e) {
	mResize=true;
	captureClientXY(e); 
}

function windowTitleMouseUp() {
	mDown = false;
}

function windowTitleMouseDown(e) {
	mDown=true;
	captureOffsetXY(e);
}

function initDrag(e) {
	if(!mDown)return;
	if(document.all) {
		x2 = window.event.clientX-(x+5);
		y2 = window.event.clientY-(y+5);
	} else {
		x2 = e.clientX - (x+5);
		y2 = e.clientY - (y+5);
	}
	document.getElementById("windowContainer").style.top = y2 + "px";
	document.getElementById("windowContainer").style.left = x2 + "px";
	originalLeft  = x2;
	originalTop = y2;
}

function doResize(nX,nY) {
	nWidth = nX - x;
	nHeight = nY- y;
	cWidth = originalWidth; cHeight = originalHeight;
	cWidth+=nWidth; cHeight+=nHeight;
	if(cWidth<=75 || cHeight <= 75) return;
	document.getElementById("windowContainer").style.width = cWidth + "px";
	document.getElementById("windowContainer").style.height = cHeight + "px";

	//resize/move children
	document.getElementById("windowTitle").style.width = (cWidth -8) + "px";
	document.getElementById("windowContainerBorder1").style.width = (cWidth - 2) + "px";
	document.getElementById("windowContainerBorder1").style.height = (cHeight-2) + "px";
	document.getElementById("contentArea").style.width = (cWidth-18) + "px";
	document.getElementById("contentArea").style.height = (cHeight-50) + "px";
	
	document.getElementById("resizeCapture").style.top = (cHeight-13) + "px";
	document.getElementById("resizeCapture").style.left = (cWidth-13) + "px";

	document.getElementById("controlBox").style.left = (cWidth - 57) + "px";
}

function handleMouseUpEvents() {
	if(mDown) {
		mDown=false;
		return;
	}
	
	if(mResize) {
		mResize=false;
		document.body.style.cursor = "default";
		originalWidth = parseInt(document.getElementById("windowContainer").style.width);
		originalHeight = parseInt(document.getElementById("windowContainer").style.height);
	}
}

function doClose() {
	document.getElementById("windowContainer").style.display = "none";
}

function doMinimize() {
	if(!isMinimized) {
		markCoordinates();
		document.getElementById("windowContainer").style.height = 24 + "px";
		minTop = document.all?document.body.clientHeight:window.innerHeight;
		document.getElementById("windowContainer").style.top = (minTop-25) + "px";
		document.getElementById("contentArea").style.display = "none";
		document.getElementById("windowContainerBorder1").style.display = "none";
		document.getElementById("resizeCapture").style.display = "none";
		isMinimized = true;
	} else {
		document.getElementById("windowContainer").style.top = originalTop + "px";
		document.getElementById("windowContainer").style.left = originalLeft + "px";
		document.getElementById("windowContainer").style.height = originalHeight + "px";
		document.getElementById("contentArea").style.display = "block";
		document.getElementById("windowContainerBorder1").style.display = "block";
		document.getElementById("resizeCapture").style.display = "block";
		isMinimized = false;
	}
}


function doMaximize() {
	x=0;y=0;
	if(!isMaximized) {
		markCoordinates();
		document.getElementById("windowContainer").style.top = 0;
		document.getElementById("windowContainer").style.left = 0;
		doResize(screen.width - originalWidth,screen.height - originalHeight);
		document.getElementById("contentArea").style.display = "block";
		document.getElementById("windowContainerBorder1").style.display = "block";
		document.getElementById("resizeCapture").style.display = "block";
		isMaximized = true;
	} else {
		doResize(0,0);
		isMaximized = false;
		document.getElementById("windowContainer").style.top = originalTop + "px";
		document.getElementById("windowContainer").style.left = originalLeft + "px";
	}
}

function handleMouseDownEvents(e) {
	if(mResize) {
		document.body.style.cursor = "nw-resize";
	}
}

function markCoordinates() {
	originalLeft  = parseInt(document.getElementById("windowContainer").style.left);
	originalTop = parseInt(document.getElementById("windowContainer").style.top);
}

function handleMouseMoveEvents(e) {
	if(mDown) {
		initDrag(e);
		return;
	}
	if(mResize) {
		if(document.all) {
			doResize(window.event.clientX,window.event.clientY);
		} else {
			doResize(e.clientX,e.clientY);
		}
	}
}

function captureOffsetXY(e) {
	if(document.all) {
		x=window.event.offsetX;
		y=window.event.offsetY
	} else {
		x = e.pageX - e.clientX;
		y = e.pageY - e.clientY;
	}
}

function captureClientXY(e) {
	if(document.all) {
		x = window.event.clientX;
		y = window.event.clientY;
	} else {
		x = e.clientX;
		y = e.clientY;
	}
}
</script>
<map name="ctrlBox">
<area alt="Minimize" title="Minimize" coords="1,0,16,15" href="javascript:doMinimize();">
<area alt="Maximize" title="Maximize" coords="16,0,34,16" href="javascript:doMaximize();">
<area alt="Close" title="Close" coords="33,0,53,16" href="javascript:doClose();"">
</map>
</head>
<body onload="init();">
<div id="windowContainer"  unselectable=on>
	<div id="windowContainerBorder1"></div>
	<div onSelect="return false" id="windowTitle"></div>
	<div id="controlBox"><img src="control_box.gif" width="52" height="15" border="0" usemap="#ctrlBox" /></div>
  <div id="contentArea">
		<h1><u>Sites de référence :</u></h1>
        
        <table width="10" border="0">
          <tr>
            <td>&#8226;</td>
            <td><a href="http://www.fitline-wellness2.info" target="_blank"><img src="../../../../../a_worldsoft/Clients/www.fitline-wellness2.info/Logo%20Fitline.jpg" width="100" height="63" border="0" /></a></td>
          </tr>
        </table>        
    
    <table width="10" border="0">
      <tr>
        <td>&#8226;</td>
        <td><a href="http://www.kv-architecture.ch" target="_blank"><img src="file:///C|/a_worldsoft/Clients/www.kv-architecture.ch/images/kv-architecture%20titre.gif" width="258" height="28" border="0" /></a></td>
      </tr>
    </table>   
        
    <table width="214" border="0">
          <tr>
            <td width="9" height="62">&#8226;</td>
            <td width="195"><p><strong><font color="#A27D2B" size="4" face="Verdana, Arial, Helvetica, sans-serif">Votre futur
                    site</font></strong><br />
            <a href="mailto:christian.deforel@gmx.ch">&eacute;crivez-moi pour
            plus de d&eacute;tails</a></p></td>
          </tr>
    </table>
        <p><font size="4">	    </font> </p>
  </div>
	<div id="resizeCapture"></div>	
</div>
</body>
</html>

 Conclusion

Veuillez me prévenir en cas de bug.

 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip


 Historique

04 février 2006 12:35:59 :
J'ai rajouté le code, juste au cas où certains d'entre vous n'auraient pas de programme d'extraction.

 Sources du même auteur

LIEN INVISIBLE

 Sources de la même categorie

Source avec Zip Source avec une capture MYNOTIFICATIONS par inwebo
Source avec Zip Source avec une capture POSMOUSE - AFFICHAGE DES COORDONNÉES DE LA SOURIS, TAILLE DE... par phidelum
SFR WIDGET ET JQUERY par hhoareau
Source avec Zip JOLIE ALERTE AVEC "ALERT()" par heycraft
Source avec Zip Source avec une capture FENETRE D'ACTUALITE par kazma

 Sources en rapport avec celle ci

DHTML IE FILTRE DÉGRADÉ (OUTIL HTML POUR DÉVELOPPEUR) par internetdev
Source avec Zip Source avec une capture FAIRE DÉFILER EN BOUCLE UNE IMAGE DANS UN <TABLE> par Isole
Source avec Zip Source avec une capture FAUSSE POPUP AVEC EFFET DE TRANSPARENCE par manathan
Source avec Zip MISE À JOUR D'UNE LISTE DÉROULANTE VIA UN POPUP par ahcorad
Source avec Zip Source avec une capture FAUSSE POPUP DHTML par bebe47

Commentaires et avis

Commentaire de babid le 05/02/2006 18:48:17

Salut,

Sympa, je n'ai pas regardé le code mais tout fonctionne sauf l'agrandissement qui doit être un peu diminué sinon du scroll apparaît, rien de grave en soit, juste une valeur à modifier.

Bonne continuation
8/10

Commentaire de Pierre Gelin le 07/02/2006 12:00:30

Bonjour,

Resultat très sympa si on veux vraiment reproduire le look windows. Si on voulait pousser le truc jusqu'au bout, ne pourrait-on pas tester le système d'exploitation et adapter le look en conséquence ? (mais ça fait rajouter du code pour un pourcentage minime d'utilisateur).

juste une petite remarque (mais c'est vraiment du détail !) : le double-clic sur la barre bleue ne permet pas de passer du plein ecran au mode fenêtre (alors que le bouton prévu a cet effet est présent et fonctionne). Beaucoup de personnes (dont moi) pratiquent ainsi pour maximiser les fenêtre et comme du code est prévu pour, autant le connecter.

Je mets 9/10

Commentaire de proftnj le 01/08/2006 18:26:04

Etonnant! Quel boulot!

Il faudrait effectivement définir une taille plus petite pour la fenêtre agrandie.

Comportement parfait avec Internet Explorer. Avec Firefox, lorsqu'on clique pour déplacer la fenêtre, elle se déplace vers la droite pour que son coin supérieur gauche coincide avec le curseur. Pas grave.

9/10

Commentaire de maxdgdg le 13/08/2006 14:01:49

bonjour

vraiment super, c'est exactement ce que je recherchais !

Petite demande perso :

est il possible que cette fenetre se place toute seule au milieu de l'ecran du visteur en fonction de sa résolution

à la facon de :

window.open(url, "site", "toolbar=0,location=0,directories=0,status=no, scrollbars=0,resizable=0,menubar=0,top="+hauteur+",left="+largeur+",width="+l+",height="+h);

merci d'avance

Commentaire de sexycool le 26/02/2007 21:58:51

houla qu'il est looooooonnnnnnngggggg ce code

Commentaire de kiki67100 le 13/03/2007 19:29:02

Tous sa pour saaaa !!!! :X
mais je mis 7/10 pour le travail bravo
vraiment bienfait

Commentaire de MisterLuis le 23/03/2010 10:57:16

Bonjour,

étant novice dans la matière, j'ai pas trouvé où il fallait modifier le code. En fait, je voudrais que le popup apparaisse à l'aide d'un click sur un lien et non au démarrage de la page.
Quelqu'un pourrait-il m'aider ?

Merci.

Commentaire de NEVERFORGET le 23/03/2010 13:44:46

Voilà un script que tu peux employer :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Div caché à l'ouverture de la page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" language="JavaScript">
<!--

function ShowHide(dBlock, dImage)
{
if (dBlock.style.display == "none")
{
dBlock.style.display = "block";
dImage.src = "http://217.196.177.129/wcms/ftp/c/cdwebdesign.ws/siteimages/2410.gif";

}
else
{
dBlock.style.display = "none";
dImage.src = "http://217.196.177.129/wcms/ftp/c/cdwebdesign.ws/siteimages/2411.gif";

}
return;
}

//-->
</script>
</head>

<body>
<p><img src="http://217.196.177.129/wcms/ftp/c/cdwebdesign.ws/siteimages/2411.gif" align="absmiddle" id="ImageA" onclick="ShowHide(DescA, ImageA)" >
  <a href="Javascript:ShowHide(DescA, ImageA);">ouvrir/cacher</a> <font size="2" face="Arial, Helvetica, sans-serif">la
  fausse popup.</font></p>
<div id="DescA" style="display:none">
<p><span id="essai">
    <script language="javascript" type="text/javascript">
   <!--
   document.getElementById("essai").style.display = (readCookie("essaiBox") == 'inline') ? 'inline' : 'none';
   // -->
</script>
    </span><span id="essai">
  <tr>
    <td height="521"> <font size="2" face="Arial, Helvetica, sans-serif">C'est l&agrave; que tu mets ta fausse popup</font>
<div class="PostContent"></div>
      <div align="left">
        <p><font size="2"></font></p>
      </div></td>
  </tr>
  </span></div>

<div id="DescB" style="display:none"></div>

</body>
</html>

Commentaire :
Pour les signes "+" et "-" je te conseille de les enregistrer et de les mettre à la racine de ton site et de ne pas employer les miens (../2410.gif et ../2411.gif dans le "head" et le "body") car si je change quelque chose sur mon site...
Il s'agit simplement d'un style pour le div qui le cache à l'ouverture de la page et l'affiche en cliquant sur le lien.
Voilà, j'espère ainsi t'avoir aidé.
Bonne prog.

Commentaire de MisterLuis le 23/03/2010 13:51:20

Merci !

Je pense que ça va bien m'aider.

 Ajouter un commentaire


Discussions en rapport avec ce code source dans le forum

fausse popup dhtml bug [ par scanner68 ] bonjour voila j'ai telecharger un script sur ce site mais il y a une erreur dans lescript et il n'est pas compatible avec firefox donc j'aimerais un p limité une fausse popup à une fois par visite [ par jecirbe ] Bonjour,J'ai utilisé un script javascript pour créer une fausse popup. Je me suis débrouiller ( un peu de script par ci un autre part là)  pour que ce Modifier une fausse popup avec calque [ par AnalchiK ] Bonjour à tous,Ma question concerne ce script:http://www.javascriptfr.com/codes/FAUSSE-POPUP-AVEC-EFFET-TRANSPARENCE_41941.aspxDa Besoin d'aide avec une fausse popup avec effet de transparence [ par cossette ] Bon moi jaurais besoin daide pour installer cette fausse popup avec effet de transparence --&gt; http://www.javascriptfr.com/code.aspx?ID=41941sur mon fausse popup [ par tirikou ] Bonjour,Après moult recherches, je n'arrive pas à trouver mon bonheur.Je suis tout à fait nul en javascript et n'arrive pas à trouver le bout de code script pour message d'erreur / confirmation en fausse popup [ par olivier22068 ] bonjour a tousje cherche un script qui me permettrai de m'afficher des messages de confirmation ou d'erreur dans une sorte de fausse popup au milieu d popup [ par nellynelly ] merci pour votre aide !Qu'est ce qu'un popup !!! suis débutante merci !!! un popup [ par naffou ] bonjourje voudrais bien utiliser un popup  comme formulaire d'inscription mais j ai trouve une solution avec java script et j arrive pas a l integer d insertion code dhtml [ par tontonbobs ] Bonjour.D'abord je ne sait pas si je peut demander cela ici.(règles du forum)Voila mon souci.Je veut installer un code DHTML, probleme ouverture de ma popup [ par maxos32 ] salut  a tous, j'ai un probleme sur mon site, en fait j'utilise joomla. j'ai utilisé l'un des modules qui me permet d'encapsuler une iframe la ou je l


Nos sponsors


Sondage...

Comparez les prix

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,515 sec (4)

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