"Jenny" <jwilliams64@earthlink.net> wrote in message
news:aRzXe.64253$SL.996468@twister.southeast.rr.co m...[color=blue]
> Hi - There's a neat little snowfall effect at
>
http://javascript.internet.com/bgeffects/snow.html. I want to use it for a
> school project, but I need to run it by clicking on a button, rather than
> when the page loads. In the HTML, I want to use something like:
>
> <FORM>
> <INPUT TYPE="button" value="Winter Time" onClick="?????">
> </FORM>
>
> but I cannot figure out what to do with the actual script to make this[/color]
work.[color=blue]
> I'd appreciate any suggestions. BTW, I'm a serious novice, so please keep[/color]
it[color=blue]
> as simple as possible. Thank you.
> Jenny[/color]
Place this (exisiting) code in a function:
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
Then have a link invoke the function.
Such as:
function Snowflakes() {
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
}
<a href="javascript
:Snowflakes()">Snowflakes</a>
or
<img src="http://javascript.internet.com/img/snow/snow.gif"
border="0" width="24" height="24" onclick="Snowflakes()"
alt="Snowflakes" title="Snowflakes">