From: Scott A. L. <sc...@sc...> - 2000-11-29 23:21:38
|
Well, for one, I think the use of "javascript:" as a protocol is deprecated, but I'm not sure. Second, using "javascript:" has unintended side effects. For example, it will freeze animated GIFs. If someone clicks the link while a script is being loaded, the browser will abort loading the script. I've also noticed that "javascript:" links take longer to execute. The browser sometimes hangs for several seconds. There's a few more problems I saw posted on another DHTML list, but I can't find them. The general agreement was that using onclick is safer. -- scott andrew lepera ----------------------------------- web stuff: www.scottandrew.com music stuff: www.walkingbirds.com Bill Wesley wrote: > > Why would you use this syntax, with href="#": > > <a href="#" onclick="return false;" onfocus="document...layer.focus();"> > <div id="layer" ...> > </a> > > Rather than with href="javascript:void(null)": > > <a href="javascript:void(null)" onclick="return false;" > onfocus="document...layer.focus();"> > <div id="layer" ...> > </a> > > ? > |