<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title></title>
</head>
<script type="text/javascript">function foto()
{
foto= new Image();
foto.src= "test.jpg";
x= foto.width;
y= foto.height;
Das funktioniert nicht. Da das Bild erst geladen werden muss, bevor du die Größe kennst.
Dafür existiert das onload event, dass du hier benutzen musst.
Hier ist ein Skript, dass das tut was du willst
http://home.arcor.de/struebig/js/popup/index.htm
Struppi.