[Javascript] Something better than... 2nd post

Nick Fitzsimons nick at nickfitz.co.uk
Tue Oct 25 07:29:48 CDT 2005


For your third post, you could remove the extra semicolon at the start of
your function :-)

if(!e);  e = window.event;
------^

should be

if(!e)  e = window.event;

(Also, it's usually better not to use HTML for email... but maybe that's
just me.)

Cheers,

Nick.

> <html><div style='background-color:'><P>(No delivery confirmation
> received!)&nbsp;Reposting script only:</P>
> <P><BR>&lt;script&gt;</P><PRE>function changestate(e){
> 	if(!e);  e = window.event;
>
> 	if(e.srcElement){
> 	   e = e.srcElement
> 	}
>
>    else if(e.target){
> 	   e=e.target
> 	}
>
> 	if(e.className.search('nor') == -1){
> 	   e.className=e.className.replace('sel','nor')
> 	}
>
>    else{   e.className=e.className.replace('nor','sel')
> 	}
>     }
>
> document.onclick=changestate;
> </PRE>
> <P>&lt;/script&gt;<BR><BR><BR></P>
> <DIV>
> <P align=center>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR>Troy
> III<BR>progressive art
> enterprise<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</P></DIV>
> <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT:
> #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px;
> FONT-FAMILY: tahoma,sans-serif">
> <HR color=#a0c6e5 SIZE=1>
> From: <I>Terry Riegel <A
> href="mailto:riegel at clearimageonline.com">riegel at clearimageonline.com</A></I><BR>
> <P></FONT>&nbsp;</P></BLOCKQUOTE></div><br clear=all><hr>Express yourself
> instantly with MSN Messenger! <a
> href="http://g.msn.com/8HMAEN/2743??PS=47575" target="_top">MSN
> Messenger</a> Download today it's FREE!</html>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>

-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/






More information about the Javascript mailing list