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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
| <html>
<head>
<style type="text/css">
.titlebar{font-size:11px;
font-family:verdana;
color:white;
font-weight:bold;
width:100%;
background-color:Darkslateblue;
padding:2px;
text-align:left;
}
.msgbox{border:outset 2px white;
background-color:gainsboro;
width:300px;
height:180px;
color:black;
padding-left:1px;
padding-right:2px;
padding-top:1px;
font-family: verdana;
font-size:11px;
text-align:center
}
.cross{border:outset 2px white;
background-color:gainsboro;
left:2px;
width:18px;
color:black;
font-family:tahoma;
float:right;
margin-top:0px;
padding-left:4px;
padding-bottom:2px;
padding-top:1px;
top:0px;
line-height:10px;
cursor:default;
}
.bouton{width:80px;
height:25px;
border:oustet 2px silver;
position:relative;
font-size:11px;
font-family: tahoma;
}
.innerText{width:100%;
padding-left:30px;
text-align:left;
}
#testzone {position:absolute;
top:100px;
left:200px;
}
</style>
<script type='text/javascript'>
var im,log;
function verifIm(){
if ((im.height>29 || im.width>26)){
msg="La hauteur maximum du logo est de : 29 <br />et la hauteur de votre logo est de : "+im.height
msg+="<p>La largeur maximum du logo est de : 26 <br />et la largeur de votre logo est de : "+im.width
msg+="</p><p>VEUILLEZ MODIFIER LES DIMENSIONS DE VOTRE LOGO</p>"
msg+="<input type='button' value='OK' onclick='document.getElementById('testzone').style.display='none''>"
val2 = document.createElement("input");
val2.type = "file";
val2.name= "logo";
val2.id= "logo";
val2.onchange = function(){
verif();
}
log.parentNode.replaceChild(val2,log);
log = val2;
im.src = "";
document.getElementById('testzone').style.display='block';
document.getElementById('testzone').innerHTML = msg;
}
}
function verif(){
document.getElementById('testzone').innerHTML = '';
cont = document.getElementById('container');
im.onload = function(){setTimeout("verifIm()",500);}
im2.src = log.value;
im.src = log.value;
}
window.onload = function(){
im = document.getElementById('monimg');
im2 = document.getElementById('miniimg');
log = document.getElementById('logo');
}
</script>
</head>
<body>
<div id='errmess' style='color:red;font-weight:bold;font-size:bigger'></div>
<input name="logo" type="file" id='logo' size="20" maxlength="40" onchange="verif()" onclick="im2.src=''">
</div>
<div style="width:0px;height:0px;overflow:hidden"><img id="monimg" alt="test de votre logo" src="" name="tjs_img"/></div>
<div id="container">
<div align="center"><img id="miniimg" style="width:100px;" alt="test de votre logo" src="" name="min_img"/>
</div></div>
<div id='testzone' class="msgbox" style="display:none;" >
<div class="titlebar">
<div class="cross">X</div> Title
</div>
<br/>
<br/>
<br/>
<div class='innerText'>
</div>
<br/>
<br/>
<br/>
<div>
<input type="button" id="trap" value="OUI" class="bouton" onclick="document.getElementById('testzone').style.display='none';" style="left:0px;"/>
<input type="button" id="trap" value="NON" class="bouton" style="left:5px;"/>
</div>
</div>
</body>
</html> |