|
|
|
|
Saaluut :o)
Les fenetre dont tu parle je ne vois pas trop mais je pense que ce n'est pas faisable en html :o) Pour IE et le titre.... non on peut pas :-( a moins peut etre de coller plein d'espaces aprés ton titre mais je pense qu'il mettera dans ce cas là "ton titre ... - Internet Explorer" A tester :o) ++ Na kaer eo va Breizh, gand ar mor glaz èn-dro dezi ! |
Salut,
C'est tout à fait possible avec un peu de JavaScript ou de dhtml. Tu trouveras peut-être ton bonheur ici : http://www.editeurjavascript.com/scripts/scripts_nav.php Par contre, fait attention, il risque d'y avoir des problèmes de compatibilité avec certains navigateurs... A+ |
Salut et merci Salut,
Je connaissais déjà ce site mais je n'ai pas trouvé ce que je cherche (de plus, celui qui pourrait me convenir ne fonctionne qu'avec IE 5 mais inférieur ni supérieur. Je te remercie quand même pour ton aide. J'en ai un, téléchargé d'un site mais il me paraît bien compliqué (long surtout) et je suis pratiquement sur qu'on doit pouvoir oter pas mal de lignes.. Si je te l'envoie, saurais-tu le réduire où l'interpreter ? L'exemple qu'il donne conviendrait pour ce que je veus en faire. merci ;-) http://abarka.free.fr Un adulte assis voit plus loin qu'un jeune debout. |
Salut,
En fait c'est "Snake" qu'il fallait lire dans le champ nom du deuxième message, et non pas "Salut" ; )) Je me suis précipité. euh... je ne suis pas un spécialiste du JavaScript. je connais les bases mais si ça se complique trop, j'suis pas sûr de pouvoir suivre. M'enfin vas-y, tu peux poster ton script ici... si j'y comprends rien moi non plus d'autres seront peut-être à même de nous expliquer ; ) A+ |
Salut Snake et les autres bien sur,
Voici donc le script en question: /* CHROMELESS WINDOWS v.30.6 (c) Gabriel Suchowolski power[z]one / www.microbians.com / powerz@microbians.com Distributed under the terms of the GNU Library General Public License (www.gnu.org) Traduction française : Oznog / www.trucsweb.com */ function openchromeless(theURL,wname,W,H,X,Y,NONEgrf,CLOSEdwn,CLOSEup,CLOSEovr,MINIdwn,MINIup,MINIovr,CLOCKgrf,titHTML,titWIN,winBORDERCOLOR,winBORDERCOLORsel,winBGCOLOR,winBGCOLORsel){ var isie=false var isv55=false var iswin=false if(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)>=4){isie=true;if(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE ")+5,navigator.appVersion.indexOf("MSIE ")+8)>=5.5)isv55=true} if(navigator.userAgent.toLowerCase().indexOf("win")!=-1)iswin=true if(X==null)X=Math.ceil((window.screen.width-W)/ 2) if(Y==null)Y=Math.ceil((window.screen.height-H)/ 2) if(isie){H=H+20+3;W=W+2;} var s=",width="+W+",height="+H; if(isie&&iswin){ var chromeTIThtml=''+ '<html>\n'+ '<head>\n'+ '<style type="text/css">\n'+ '#crtMOVE {position:absolute;left:0px;top:0px;z-index:2;}\n'+ '#txtTITLE {position:absolute;left:0px;top:0px;width:100%;height:20px;z-index:1;clip:rect(0,100%,20,0);}\n'+ '#btnCLOSE {position:absolute;left:-20px;top:4px;width:11px;height:11px;z-index:3;clip:rect(0,11,11,0);}\n'+ '#btnMINI {position:absolute;left:-20px;top:4px;width:11px;height:11px;z-index:3;clip:rect(0,11,11,0);}\n'+ '#grfCLOCK {position:absolute;left:-20px;top:4px;width:11px;height:11px;z-index:3;clip:rect(0,11,11,0);}\n'+ '</style>\n'+ '<script language="javascript">\n'+ 'var imgCLOSEdwn=new Image();imgCLOSEdwn.src="'+CLOSEdwn+'"\n'+ 'var imgCLOSEup=new Image();imgCLOSEup.src="'+CLOSEup+'"\n'+ 'var imgCLOSEovr=new Image();imgCLOSEovr.src="'+CLOSEovr+'"\n'+ 'var imgMINIdwn=new Image();imgMINIdwn.src="'+MINIdwn+'"\n'+ 'var imgMINIup=new Image();imgMINIup.src="'+MINIup+'"\n'+ 'var imgMINIovr=new Image();imgMINIovr.src="'+MINIovr+'"\n'+ 'var CLOCKgrfImg=new Image();CLOCKgrfImg.src="'+CLOCKgrf+'"\n'+ 'document.onselectstart=new Function("return false;")\n'+ 'document.ondragstart=new Function("moveWIN();return false;")\n'+ 'document.oncontextmenu=new Function("return false;")\n'+ 'document.onmousemove=moveWIN\n'+ 'winSTATUS="up"\n'+ 'function setLAYOUT() {\n'+ 'document.all["btnCLOSE"].style.pixelLeft=document.body.clientWidth-18\n'+ 'if ( top.mainloaded ) {\n'+ 'document.all["grfCLOCK"].style.visibility="hidden"\n' if(isv55){ chromeTIThtml+=''+ 'document.all["btnMINI"].style.visibility="visible"\n'+ 'document.all["btnMINI"].style.pixelLeft=document.body.clientWidth-38\n' } chromeTIThtml+=''+ '}\n'+ 'else {\n'+ 'document.all["btnMINI"].style.visibility="hidden"\n'+ 'document.all["grfCLOCK"].style.pixelLeft=document.body.clientWidth-38\n'+ 'setTimeout("setLAYOUT()",500)\n'+ '}\n'+ '}\n'+ 'function minimizeWIN() {\n'+ 'top.window.moveTo(0,-4000)\n'+ 'if ( (top.opener) && (!top.opener.closed) ) { top.opener.window.focus();}\n'+ 'top.window.blur()\n'+ '}\n'+ 'function moveWIN() {\n'+ 'if ( winSTATUS=="down") {\n'+ 'document.body.bgColor="'+winBGCOLORsel+'"\n'+ 'parent.bordeM.document.body.bgColor="'+winBORDERCOLORsel+'"\n'+ 'parent.bordeT.document.body.bgColor="'+winBORDERCOLORsel+'"\n'+ 'parent.bordeB.document.body.bgColor="'+winBORDERCOLORsel+'"\n'+ 'parent.bordeL.document.body.bgColor="'+winBORDERCOLORsel+'"\n'+ 'parent.bordeR.document.body.bgColor="'+winBORDERCOLORsel+'"\n'+ 'ofx=event.x\n'+ 'ofy=event.y\n'+ 'winSTATUS="drag"\n'+ '}\n'+ 'else if ( winSTATUS=="drag") {\n'+ 'px=event.screenX-ofx-1\n'+ 'py=event.screenY-ofy-1\n'+ 'top.window.x=px\n'+ 'top.window.y=py\n'+ 'top.window.moveTo(px,py)\n'+ '} else {\n'+ 'document.body.bgColor="'+winBGCOLOR+'"\n'+ 'parent.bordeM.document.body.bgColor="'+winBORDERCOLOR+'"\n'+ 'parent.bordeT.document.body.bgColor="'+winBORDERCOLOR+'"\n'+ 'parent.bordeB.document.body.bgColor="'+winBORDERCOLOR+'"\n'+ 'parent.bordeL.document.body.bgColor="'+winBORDERCOLOR+'"\n'+ 'parent.bordeR.document.body.bgColor="'+winBORDERCOLOR+'"\n'+ 'winStatus="up"\n'+ '}\n'+ '}\n'+ '</script>\n'+ '</head>\n'+ '<body onresize="setLAYOUT()" bgcolor='+winBGCOLOR+'>\n'+ '<div id=crtMOVE><img onmousedown="winSTATUS=\'down\';moveWIN()" onmouseup="winSTATUS=\'up\';moveWIN()" border=0 src="'+NONEgrf+'" width=110% height=500></div>\n'+ '<div id=txtTITLE>'+'<table width=100% height=20 border=0 cellpadding=0 cellspacing=0><tr><td valign=middle align=left>'+titHTML+'</td></tr></table>'+'</div>\n'+ '<div id=btnCLOSE><img name=imgCLOSE src="'+CLOSEup+'" border=0 width=11 height=11 onmouseover="this.src=imgCLOSEovr.src" onmouseout="btnSTATUS=false;this.src=imgCLOSEup.src" onmouseup="this.src=imgCLOSEup.src" onmousedown="this.src=imgCLOSEdwn.src" onclick="top.window.close()"></div>\n'+ '<div id=btnMINI><img name=imgMINI src="'+MINIup+'" border=0 width=11 height=11 onmouseover="this.src=imgMINIovr.src" onmouseout="btnSTATUS=false;this.src=imgMINIup.src" onmouseup="this.src=imgMINIup.src" onmousedown="this.src=imgMINIdwn.src" onclick="minimizeWIN()"></div>\n'+ '<div id=grfCLOCK><img name=imgCLOCK src="'+CLOCKgrf+'" border=0 width=11 height=11></div>\n'+ '<script>setLAYOUT()</script>\n'+ '</body>\n'+ '</html>\n' var chromeFRMhtml=''+ '<HTML>\n'+ '<HEAD>\n'+ '<TITLE>'+titWIN+'</TITLE>\n'+ '</HEAD>\n'+ '<script>\n'+ 'top.mainloaded=false\n'+ 'function generatetitle() {\n'+ 'if( window.frames["frmTIT"] && window.frames["bordeL"] && window.frames["bordeB"] && window.frames["bordeR"] && window.frames["bordeM"] ) {\n'+ 'frmTIT.document.bgColor="'+winBGCOLOR+'"\n'+ 'frmTIT.document.open()\n'+ 'frmTIT.document.write( "'+quitasaltolinea(chromeTIThtml)+'" )\n'+ 'frmTIT.document.close()\n'+ 'bordeM.document.bgColor="'+winBORDERCOLOR+'"\n'+ 'bordeL.document.bgColor="'+winBORDERCOLOR+'"\n'+ 'bordeR.document.bgColor="'+winBORDERCOLOR+'"\n'+ 'bordeB.document.bgColor="'+winBORDERCOLOR+'"\n'+ 'bordeT.document.bgColor="'+winBORDERCOLOR+'"\n'+ '} else {\n'+ 'setTimeout("generatetitle()",20)\n'+ '}\n'+ '}\n'+ 'top.window.h='+H+'\n'+ 'top.window.w='+W+'\n'+ 'top.window.x='+X+'\n'+ 'top.window.y='+Y+'\n'+ 'generatetitle()\n'+ '</script>\n'+ '<frameset onload="top.mainloaded=true" onfocus="top.window.moveTo(top.window.x,top.window.y)" border=0 framespacing=0 frameborder=0 cols="1,100%,1">\n'+ '<frame name=bordeL src="about:blank" scrolling=no noresize>\n'+ '<frameset border=0 framespacing=0 frameborder=0 rows="1,20,1,100%,1">\n'+ '<frame name=bordeT src="about:blank" scrolling=no noresize>\n'+ '<frame name=frmTIT src="about:blank" scrolling=no noresize>\n'+ '<frame name=bordeM src="about:blank" scrolling=no noresize>\n'+ '<frame name=main src="'+theURL+'">\n'+ '<frame name=bordeB src="about:blank" scrolling=no noresize>\n'+ '</frameset>\n'+ '<frame name=bordeR src="about:blank" scrolling=no noresize>\n'+ '</frameset>\n'+ '</HTML>' var CWIN=window.open("",wname,"fullscreen=1"+s) CWIN.resizeTo(Math.ceil(W),Math.ceil(H)) CWIN.moveTo(Math.ceil(X),Math.ceil(Y)) CWIN.document.open() CWIN.document.write(chromeFRMhtml) CWIN.document.close() }else{ var CWIN=window.open(theURL,wname,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0"+s,true) CWIN.moveTo(Math.ceil(X),Math.ceil(Y)) } CWIN.focus() return CWIN } function quitasaltolinea(txt){ var salida=txt.toString() var re=/\\/g;var salida=salida.replace(re,"\\\\"); re=/\//g;var salida=salida.replace(re,"\\\/"); re=/\"/g;var salida=salida.replace(re,"\\\""); re=/\'/g;var salida=salida.replace(re,"\\\'"); re=/\n/g;var salida=salida.replace(re,"\\n"); return salida } Je suis certain qu'on n'a pas besoin de tous ces parametres (ça fait beaucoup de lignes pour une si petite chose non ? Merci en tous cas à celui/celle qui pourrait m'aider a décrire ces lignes, en mettant des /*commentaires par exemple http://abarka.free.fr Un adulte assis voit plus loin qu'un jeune debout. |
Ouch !! LOL
bon je vais aller bouffer d'abord ; )) A+ |
bon, je ne vais pas commenter tout ça, d'autant plus que je ne comprends pas tout non plus ; ) Il semblerait néanmoins que assez peu de choses soient vraiment inutiles.
J'ai l'impression que le script gère entièrement la création de la pop up, jusqu'à l'emplacement des boutons fermer, réduire : <style type="text/css">\n'+
'#crtMOVE {position:absolute;left:0px;top:0px;z-index:2;}\n'+
'#txtTITLE {position:absolute;left:0px;top:0px;width:100%;height:20px;z-index:1;clip:rect(0,100%,20,0);}\n'+
'#btnCLOSE {position:absolute;left:-20px;top:4px;width:11px;height:11px;z-index:3;clip:rect(0,11,11,0);}\n'+
'#btnMINI {position:absolute;left:-20px;top:4px;width:11px;height:11px;z-index:3;clip:rect(0,11,11,0);}\n'+
'#grfCLOCK {position:absolute;left:-20px;top:4px;width:11px;height:11px;z-index:3;clip:rect(0,11,11,0);}\n'+
'</style>\n'+
'<script language="javascript">\n'+
'var imgCLOSEdwn=new Image();imgCLOSEdwn.src="'+CLOSEdwn+'"\n'+
'var imgCLOSEup=new Image();imgCLOSEup.src="'+CLOSEup+'"\n'+
'var imgCLOSEovr=new Image();imgCLOSEovr.src="'+CLOSEovr+'"\n'+
'var imgMINIdwn=new Image();imgMINIdwn.src="'+MINIdwn+'"\n'+
'var imgMINIup=new Image();imgMINIup.src="'+MINIup+'"\n'+
'var imgMINIovr=new Image();imgMINIovr.src="'+MINIovr+'"\n'+
'var CLOCKgrfImg=new Image();CLOCKgrfImg.src="'+CLOCKgrf+'"\n'+
voire même jusqu'à la redéfinition des fonctions de redimensionnement et de déplacement !!!! 'function minimizeWIN() {\n'+
'top.window.moveTo(0,-4000)\n'+
'if ( (top.opener) && (!top.opener.closed) ) { top.opener.window.focus();}\n'+
'top.window.blur()\n'+
'}\n'+
'function moveWIN() {\n'+
'if ( winSTATUS=="down") {\n'+
'document.body.bgColor="'+winBGCOLORsel+'"\n'+
'parent.bordeM.document.body.bgColor="'+winBORDERCOLORsel+'"\n'+
'parent.bordeT.document.body.bgColor="'+winBORDERCOLORsel+'"\n'+
'parent.bordeB.document.body.bgColor="'+winBORDERCOLORsel+'"\n'+
'parent.bordeL.document.body.bgColor="'+winBORDERCOLORsel+'"\n'+
'parent.bordeR.document.body.bgColor="'+winBORDERCOLORsel+'"\n'+
'ofx=event.x\n'+
'ofy=event.y\n'+
'winSTATUS="drag"\n'+
'}\n'+
'else if ( winSTATUS=="drag") {\n'+
'px=event.screenX-ofx-1\n'+
'py=event.screenY-ofy-1\n'+
'top.window.x=px\n'+
'top.window.y=py\n'+
'top.window.moveTo(px,py)\n'+
donc à mon avis vaudrait mieux le laisser tel quel. et après tout, pourquoi ne pas l'utiliser ainsi s'il te convient ?? A+ |
| 26/02 09h45 | Changer de gestionnaire de fenêtre sous Gnome | Linux |
| 01/11 09h23 | [Windows] Fermer toutes les fenêtres d'exploration actives | Windows |
| 05/01 12h20 | [popups] Ouverture de fenêtres internet publicitaires (pop-up) | Virus |
| 11/10 11h47 | Empêcher la fermeture de la fenêtre ipconfig ou ping | Windows XP |
| 17/03 21h28 | Gestionnaires de fenêtres | Bureaux |
| 24/03 12h10 | [Framakey] Bordure fenêtre windows!!!!! | 1 |
| 16/08 03h24 | Bordures de fenêtre .. | 1 |
| 14/08 11h22 | Perte de bordure de fenetre | 12 |
| 16/02 19h38 | Problème: Bordures de fenêtres (ubuntu 7.10) | 2 |
![]() | Opera - Marre des trous de sécurité du navigateur par défaut ? Envie enfin d'avoir un navigateur simple et configurable facilement ?... | Catégorie: Navigateurs Licence: Freeware/gratuit |
![]() | Desktop Manager - Desktop Manager est un gestionnaires de bureaux virtuels. Il permet de créer un nombre limités (à la taille de la... | Catégorie: Personnalisation Licence: Open Source |
![]() | Virtual Dimension - Ce logiciel vous permet d'avoir des bureaux virtuels, c'est à dire des écrans avec chacun leurs fenêtres, barre des tâches... | Catégorie: Environnement de travail Licence: Open Source |
![]() | VirtuaWin - Ce logiciel vous permet d'avoir des bureaux virtuels, c'est à dire des écrans avec chacun leurs fenêtres, barre des tâches... | Catégorie: Environnement de travail Licence: Open Source |