Forum Moderators: open
What I'm trying to do is set the width and height of an image as variables, and then change the size of the image by changing the value of the variables.
Below is my latest attempt but it doesn't work.
Help.
<html>
<head>
<title>Untitled</title>
<div id=Image1 style="position:absolute; left=0; top=0;">
<img src="Image 1.jpg"; width=a; height=b;>
</div>
</head>
<body>
<script language="javascript">
var a
var b
a=150
b=300
</script>
</body>
</html>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<div id=Image1 style="position:absolute; left=0; top=0;">
<script type="text/javascript">
var a;
var b;
a=150;
b=300;
document.write('<img src="pagerror.gif" width='+a+' height='+b+'>')
</script>
</div>
</body>
</html>