[PHP-JS] php et javascript
bonjour à tous
je suis en train de faire en sorte que lorsqu'un utilisateur clique sur une photo, elle s'agrandisse
jusqu'ici tout va bien si je fais HTML + JS
mais quand je met du JS dans du php, rien ne va plus
j'ai un peu de mal..
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
<script language=javascript>
function ImageMax(chemin) {
html=<html> <head> <title>Titre</title> </head> <body bgcolor=black><IMG src=+chemin+ BORDER=0 NAME=ImageMax onLoad= window.resizeTo(document.ImageMax.width+40, document.ImageMax.height+60)></body></html>;
popupImage = window.open(,_blank,toolbar=0, location=0, directories=0, menuBar=0, scrollbars=0, resizable=1);
popupImage.document.open();
popupImage.document.write(html);
popupImage.document.close()
};
</script>
<?
echo "</head>
<body>
<center>ordinateur|imprimante</center>
<HR width=100%>
<center>
<br<<br><br><br><br>
<a href='#' onclick='ImageMax('impr_jet2.jpg')'>
<img src='impr_jet2petit.JPG' width='213' height='180' border='0' TITLE='Obtenir un agrandissement de cette image' hspace='40' Hspace=10></a>
<a href='#' onclick='ImageMax('ordinateur de bureau2.jpg')'>
<img src='ordinateur_de_bureau2petit.JPG' width='213' height='180' border='0' hspace='40' Hspace=10></a>
<img src = moniteur2petit.JPG><br>
</html>";
?> |
en faite j'ai une erreur "erreur sur la page" donc impossible d'agrandir une photo
quelqu'un peut m'aider...:cry:
merci beaucoup.