Questo funziona, ma solo con IE (ho la versione 6 su questo computer). Su Firefox non ne vuole sapere...
Se trovate di meglio.... postatecodice:<html> <head> <script language="javascript" type="text/javascript"> function getImageSize(path) { alert(path); document.getElementById('realIMG').src = path; //document.getElementById('realIMG').style.display = 'block'; var myIMG = new Image(); myIMG.src = document.getElementById('realIMG').src; //path; alert("Width: " + myIMG.width +"\nHeight: " + myIMG.height); } </script> </head> <body> <input type="file" name="imgfile" id="imgfile" /> <input type="button" name="check" value=" Check " onclick="getImageSize(document.getElementById('imgfile').value);" /> [img][/img] </body> </html>

Rispondi quotando