[thelist] javascript://

Winfried Huslik winfried at huslik.de
Thu Jun 28 07:58:49 CDT 2001


Hi,

Did you ever try:
     "javascript:;"
which is a syntactically correct empty statement as opposed to
     "javascript://"
which is not, but condoned by browsers and sometimes irritating them. 
(It calls the JavaScript engine without feeding anything to it exept a 
comment not having a clearly defined end of statement (no "\r\n" or ";").

It has IMO the same effect as: 
     "javascript:void(0)"
but is shorter.

As mentioned in this list earlier:
     a href="#"
should never be used (unless you desire the side effects) because it 
reloads the page (showing the top position regardless where your link 
was).

Put me in the hall of fames if it works.

Winfried Huslik
webmaster at owad.de



On 2001-06-27 21:46 Uhr, Anthony Baratta (Anthony at Baratta.com) wrote:

>Howdy...
>
>.jeff mentioned this elegant hack to the HREF:
>
>[a href="javascript://" onCLick="verifyForm(document.FormName);" ...]
>
>However if my function has a .submit(), the function fails to submit. The 
>whole function works fine (both IE and Netscape) except the submit when 
>javascript:// is in the HREF.  If I remove the javascript:// it submits.
>
>Go figure. Any clues??
>----
>Anthony Baratta
>President
>Keyboard Jockeys
>
>
>---------------------------------------
>For unsubscribe and other options, including
>the Tip Harvester and archive of TheList go to:
>http://lists.evolt.org Workers of the Web, evolt ! 


-- 
Winfried Huslik Tel+49 821 565606 Fax 565001 <http://www.huslikverlag.de>
Huslik Verlag GmbH  *  Unterfeldweg 3  *  86199 Augsburg  *  Germany 
  We have done so much with so little, for so long that we are now 
  qualified to do anything with nothing.  (anonymus)





More information about the thelist mailing list