Quote:
Originally Posted by Lizard King
Try this
Code:
<script type="text/javascript">
function largerThan(a,b)
{
return a>b;
}
</script>
<img src="{param}" onload="if(largerThan(this.width,500)){{this.height=this.height*500/this.width}{this.width=500}};" />
|
The only difference I could see at a quick glance was the quotes after onload= and the ending space and />.
I tried your code by copy-and-paste in case I missed something else, but it still didn't work, the image only resize after you click the edit button.
regards,
Dr. Mabuse