Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
Hi another question, I have the following code
code: <img src="{URL}" alt="Image Resized, click to view full image" title="Image Resized, click to view full image" border="0" onload="if(this.width > 500){this.width=(500); this.className='clickable';}" onMouseover="if(this.width >= 500) {document.body.style.cursor = 'pointer'}" onMouseout="document.body.style.cursor = 'default'" onclick="if(this.width >= 500) { window.open('{URL}', '_blank'); return false; }"/>
Which resizes images if they are greater than 500 in width, now how would i add some html to the end of this statement that only displays if the image is resized, or to put it another way, greater than 500 wide??
i imagine i need to put something in this IF statement
code: onload="if(this.width > 500){this.width=(500); this.className='clickable';}"
but am unsure how to make it display some html or text if this is true
To put it another way, if it resizes and image, add a bit of text to the bottom of the image
[Edited on 29-04-2007 by Steve]
|