[thelist] Tip

Michael Galvin mgalvin at sourcevisualthinking.ie
Thu Feb 28 05:00:00 CST 2002


So judging from that, because the 'arrow' variable is declared outside a
function, it retains its value (even when set within a function) throughout
the perpetuity of the page?

Michael Galvin
source visual thinking

> From: "Paul Backhouse" <paul.backhouse at 2cs.com>
> Reply-To: thelist at lists.evolt.org
> Date: Thu, 28 Feb 2002 10:09:11 -0000
> To: <thelist at lists.evolt.org>
> Subject: [thelist] Tip
>
> Another Tip - changing an image with onclick and then changing it back with
> another onclick/
>
> <tip type="onclick">
> <html>
> <head><title></title>
> <script language="javascript">
> <!--
> var arrow = "off"
>
> function ClickMe() {
> if (arrow=="off") {
> document.arrow.src='images/UpArrow.gif';
> arrow="on"
> }
> else {
> document.arrow.src='images/LeftArrow.gif';
> arrow="off"
> }
> }
> //-->
> </script>
> </head>
> <body bgcolor=#333333 topmargin="0" leftmargin="0" marginwidth="0"
> marginheight="0">
>
> <div style="position: absolute; left: 0; top: 0; z-index: 1;">
> <a href="javascript://" title="click for our services"
> onclick="ClickMe();"><img name="arrow" src=images/LeftArrow.gif width=21
> height=21 border=0 alt=""></a>
> </div>
>
> </body>
> </html>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>




More information about the thelist mailing list