Can you change a style w/ an event handler?Do you mean changing a stlye with something like JavaScript? Yes, that's basically what DHTML is in a nutshell.so whatz wrong w/this?:
<img src=http://www.webdeveloper.com/forum/archive/index.php/"blah.gif" onmouseover=style="filter:alpha (opacity=30)" onmouseout=style="filter:alpha (opacity=100)">
only need to implement it once, so there's really no use in writing a function for it.Originally posted by krautinator
so whatz wrong w/this?:
<img src=http://www.webdeveloper.com/forum/archive/index.php/"blah.gif" onmouseover=style="filter:alpha (opacity=30)" onmouseout=style="filter:alpha (opacity=100)">
hmm... pretty much everything... Yeah I figured that much.
what do I need to do to rectify the situation?Try this:
<img src=http://www.webdeveloper.com/forum/archive/index.php/"image.jpg" id="img"
onmouseover="document.getElementById('img').style.filter='alpha(opacity=30)';"
onmouseout="document.getElementById('img').style.filter='alpha(opacity=100)';">
As far as I know, the filter stuff only works in IE though (4 and higher?).
*Edit* Oops since you're not making this an external function or anything, you can just do this:
<img src=http://www.webdeveloper.com/forum/archive/index.php/"image.jpg"
onmouseover="this.style.filter='alpha(opacity=30)';"
onmouseout="this.style.filter='alpha(opacity=100)';">thank you VERY much
yea
I guess Netscape users 'll just have to suffer
haven't really been designing this page 'o' mine to be cross-browser anyway (too much friggin' trouble if your not a commercial site)
<img src=http://www.webdeveloper.com/forum/archive/index.php/"blah.gif" onmouseover=style="filter:alpha (opacity=30)" onmouseout=style="filter:alpha (opacity=100)">
only need to implement it once, so there's really no use in writing a function for it.Originally posted by krautinator
so whatz wrong w/this?:
<img src=http://www.webdeveloper.com/forum/archive/index.php/"blah.gif" onmouseover=style="filter:alpha (opacity=30)" onmouseout=style="filter:alpha (opacity=100)">
hmm... pretty much everything... Yeah I figured that much.
what do I need to do to rectify the situation?Try this:
<img src=http://www.webdeveloper.com/forum/archive/index.php/"image.jpg" id="img"
onmouseover="document.getElementById('img').style.filter='alpha(opacity=30)';"
onmouseout="document.getElementById('img').style.filter='alpha(opacity=100)';">
As far as I know, the filter stuff only works in IE though (4 and higher?).
*Edit* Oops since you're not making this an external function or anything, you can just do this:
<img src=http://www.webdeveloper.com/forum/archive/index.php/"image.jpg"
onmouseover="this.style.filter='alpha(opacity=30)';"
onmouseout="this.style.filter='alpha(opacity=100)';">thank you VERY much
yea
I guess Netscape users 'll just have to suffer
haven't really been designing this page 'o' mine to be cross-browser anyway (too much friggin' trouble if your not a commercial site)