image change

rangan76
08-03-2002, 09:55 AM
Hi,

In DHTML, Using innerHTML,<span>,<img> we can change the appearance(size,color) the text. Could we change the size of the image using this or whatelse?

Williams.

Rezner
08-03-2002, 11:38 AM
Here's a method I came up with. There's probably other ways though:<SCRIPT LANGUAGE="JavaScript">
var a = "<IMG SRC=wow.gif HEIGHT=15 WIDTH=15>"
var b = "<IMG SRC=wow.gif HEIGHT=45 WIDTH=45>"

function CheckImage()
{
ImageSwitch.innerHTML = (ImageSwitch.innerHTML == a) ? b:a;
}
</SCRIPT>


'In HTML page
<SPAN ID="ImageSwitch"></SPAN>

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum