Forum-webmaster
Technique - programmation => Javascript / DOM / Ajax => Message commencé par: NuDD le le 16-09-2003 a 03:30:18

Titre: Peut on faire un pop up sans barre de titre
Posté par: NuDD le le 16-09-2003 a 03:30:18

bonjour, je cherche a faire un pop up sans barre de titre et je n'y arrive pas ???... J'ai essayé avec Chromeless mais je trouve ça bien compliqué pour pas grand chose :-X...
Voici mon code actuellement:


Code:

<script LANGUAGE="JScript">
<!--
function OpenCenterPopUp(HTMLfile,PopUpName, x, y){
// x est la largeur et y la hauteur de l'image
if (x<window.screen.width) var Left=window.screen.width/2-x/2;
else {
Left=0;
   x=window.screen.width;
   };
if (y<window.screen.height) var Top=window.screen.height/2-y/2;
else {
Top=0;
   y=window.screen.height-90;
   };
var Configuration="'channelmode=no, toolbar=no, menubar=no, location=no, directories=no, status=no, resizeable=no, width=" + x + ", height=" + y + ", left=" + Left + ", top=" + Top;
window.open(HTMLfile,PopUpName,Configuration);
}
-->
</script>


dans le Head et par exemple


Code:
<a href="javascript:OpenCenterPopUp('Viewer/fond00_1024.html','test',150,300)")>1024 par 768</a>


dans le body

Voila. Mais ma petite fenetre a un barre de titre et je ne trouve pas cela tres beau :-\...


Sinon vous pouvez aussi aller voire la nouvelle présentation de mon site que je suis en train de construit actuellement ::)...
nudd.free.fr/Test_NewSite/index.html (http://nudd.free.fr/Test_NewSite/index.html)

Titre: Re:Peut on faire un pop up sans barre de titre
Posté par: Chanchan le le 16-09-2003 a 11:35:53

Essaie d'aller voir sur ce site

http://www.dynamicdrive.com/dynamicindex8/index.html

(peut-être connais-tu déjà ?)

Ils ont un script qui s'appelle DHTML Window Script qui utilise le DOM à 100% (compatibilité avec tous les navigateurs).

Au fait, j'ai testé ton site avec Netscape et le javascript utilisé pour ouvrir la pop-up ne fonctionne pas sous ce navigateur.

Chanchan

Titre: Re:Peut on faire un pop up sans barre de titre
Posté par: zano le le 02-01-2005 a 02:11:43

<SCRIPT LANGUAGE="JavaScript">
function PopupImage(img,commentaire) {
avis="Utiliser les barres d'ascenseur pour explorer la photo";
w=open("",'image','fullscreen,scrollbars=yes,resizable=no,toolbar=no,status=no,menubar=no,location=no,directories=no');
window.moveTo(0,0);
   w.document.write("<HTML>");
   w.document.write("");
   w.document.write("<BODY background='fonds/olive.jpg' link='#FFFFFF& onload='checksize()'>");
   w.document.write("<center>");
   w.document.write("<font style='font-family: arial;font-size: 14px' color='#000000'>");
   w.document.write("<b>"+avis+"&nbsp;. . . . .&nbsp;</b></font>");
   w.document.write("<span style='font-family:arial;font-size:12px;font-weight:bold;background-color:#990000;color:#FFFF00'>");
   w.document.write("<a OnClick='javascript:window.close()'>&nbsp;FERMER&nbsp;</a></span><BR>");
   w.document.write("<font style='font-size: 2px'><BR></font>");
   w.document.write("<img src="+img+" border=1>");
   w.document.write("<BR><img src='http://perso.wanadoo.fr/vmr/fish/04446.jpg' border=1>");
   w.document.write("&nbsp;<img src='http://perso.wanadoo.fr/vmr/fish/04447.jpg' border=1>");
   w.document.write("<font style='font-size: 2px'><BR></font>");
   w.document.write("<font style='font-family: arial;font-size: 14px' color='#000000'><b>"+commentaire+"</b>");
   w.document.write("</center></BODY></HTML>");
   w.document.close();
}</SCRIPT>


Forum-webmaster | Actionné par YaBB SE
© 2001-2003, YaBB SE Dev Team. Tous droits réservés.