From: Brandon M. <bnd...@ho...> - 2000-12-12 06:26:23
|
There are some benifits to using javascript: protocol... all data returned is placed into the page.. so javascript:'<html><body><H1>HELLO</h1></body></HTML>' would simply replace the current page with the HTML in quotes. Functions are the same, the return value of the function is also set as the source of the page. So.. dynamic javascript/html.. whatever... can be placed here... together with a target.. someone could generate dynamic script to be evaluated in an outside window or frame. This has some practical applications... Just a thought to knaw on. -----Original Message----- From: dyn...@li... [mailto:dyn...@li...]On Behalf Of Scott Andrew LePera Sent: Wednesday, November 29, 2000 6:21 PM To: dyn...@li... Subject: Re: [Dynapi-Help] events.js 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> > > ? > _______________________________________________ Dynapi-Help mailing list Dyn...@li... http://lists.sourceforge.net/mailman/listinfo/dynapi-help |