Le dimanche 17 juin 2007 02:27, laurent a écrit :
Bonjour
Où cette balise ....
<a href="#URL_PAGE{article_forum,id_article=#ID_ARTICLE}"
onclick="window.open(this.href,'_blank');return false;"></a>
Or je voudrais lui mettre dedans un où plusieurs paramétres, lui
demandant d'ouvrir un navigateur comme c'est demandé ici ...
onclick="window.open(this.href,'_blank')
mais celui-ci devra être dimensionné.
un truc de ce genre ?
onclick="window.open(this.href,'_blank', 'width=400, height=400, top=100,
left=100, toolbar=no, scrollbars=no, resizable=yes')
mais j'ai un doute sur les ' après blank et avant width, il faut essayer avec
et sans.
En fait moi j'ai un script javascript qui est :
function PopupImage(image,titre,commentaire){
w=open("",'image','width=400, height=400, top=100, left=100, toolbar=no,
scrollbars=no, resizable=yes');
w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE><link
href=\"feuilledestyle.css\" rel=\"stylesheet\" type=\"text/css\" /></HEAD>");
w.document.write("<SCRIPT language=javascript>function checksize() { if
(document.images[0].complete) {
window.resizeTo(document.images[0].width+10,document.images[0].height+110);
window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>");
w.document.write("<BODY onload='checksize()' onblur='window.close()'
onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0
marginheight=0>");
w.document.write("<div id= \"popuptitle\">"+titre+"</div>");
w.document.write("<TABLE width='100%' border='0' cellspacing='0'
cellpadding='0' ><TR>");
w.document.write("<TD valign='middle' align='center'><IMG src='"+image+"'
border=0 alt='Image agrandie'>");
w.document.write("</TD></TR></TABLE>");
w.document.write("<div id= \"popupcomment\">"+commentaire+"</div>");
w.document.write("<div id= \"popupclose\">Cliquez dans la fenêtre pour
la fermer</div>");
w.document.write("</BODY></HTML>");
w.document.close();
ça ouvre une fenêtre en 400*400 pour afficher une image de taille jamais
identique, donc redimensionnement à la volée. Et je l'apelle comme ça :
<a
href="javascript:PopupImage('images/mon_image.jpg','titre_de_la_fenetre','commentaire_eventuel')">
<img src="images/mon_image.s.jpg" width="350" height="400" alt="photo"
title="Cliquez pour agrandir"/>
</a>
Je ne sais si ça te conviendra.
--
Cordialement, Daniel Cartron
« Le chien aime passionnément les odeurs fétides. Si le chien est fidèle à
l'homme, c'est parce que l'homme pue. »
François Cavanna - Le saviez-vous ?