[thelist] Changing style.backgroundImage of a submit button i n js?
Roger Newbrook
roger.newbrook at scientiasolutions.com
Fri Jan 13 10:17:11 CST 2006
Tom wrote:
"Anyway, I have this code:
<input type="submit" name="helpme" style="background:
url('/images/btn-helpme.gif'); width: 351px; height: 80px; border: 0;"
value="" onmouseover="kbutHitState(this);" />
with the function:
function kbutHitState(oButton)
{
oButton.style.backgroundImage = "url(/'images/btn-helpme_on.gif')";
}
This works fine in FF, but I get a script error in IE: "invalid argument".
Does IE not support the access of the backgroundImage property on a submit
input? The kluginess(tm) of this is just a-killin me."
not sure from a technical perspective but i think the border attribute
should be
border-width:0px;
it may explain the error and may even help!!
r
More information about the thelist
mailing list