Re: FORM element requires ACTION attribute: problems with compatibility

-----BEGIN PGP SIGNED MESSAGE-----

At 12:44 AM 18/08/97 -0400, Jordan Reiter wrote:
>At 10:54 PM -0000 8/16/97, E. Stephen Mack wrote:
>>This all ties into a related problem, which is that there is no way
>>to hide an HTML element with an event attribute from a non-script-
enabled
>>user agent.
>
><SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
>  <!--
>    document.write ('<INPUT TYPE="BUTTON" VALUE="Click Me"
>onClick="ButtonHandler()">');
>  //-->
><P>Since your browser is not script-enabled, please use the <A
>HREF="nobutton.html">alternative document</A>.
></SCRIPT>
>
>since Script-savvy browsers should ignore anything inside the script 
tags,
>while script-ignorant browsers won't.

No, JavaScript-enabled browsers will generate a JavaScript error since 
"<P>Since..." is not syntactically valid JavaScript.  What you could do is

<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
  <!--
    document.write ('<INPUT TYPE="BUTTON" VALUE="Click Me" 
onClick="ButtonHandler()">');
  //-->
<!-- --> <P>Since your browser is not script-enabled, please use the
<!-- --> <A HREF="nobutton.html">alternative document</A>.
</SCRIPT>

but this is actually worse than SCRIPT + NOSCRIPT since only HTML 2.0 
browsers, unaware of the SCRIPT element, would render the HTML.  It's also 
a gross hack.

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQB1AwUBM/fdQA/JhtXygIx1AQEZLQL/c+zWeFeO5auPvFOCPYbY7hfC0aC2Ifjx
ppeWiTfKuze5eoX+p80TgEpSJeLBXTjnRLjcxsZB9Hu1PW55lajPtiOJQI3ca7YU
XULdTfzzwy7QzYHNYXvHtMzIWw1Ud5di
=lO20
-----END PGP SIGNATURE-----

Liam Quinn
===============  http://www.htmlhelp.com/%7Eliam/  ===============
Web Design Group            Enhanced Designs, Web Site Development
http://www.htmlhelp.com/    http://enhanced-designs.com/
======  PGP Key at http://www.htmlhelp.com/%7Eliam/pgp.html  =====

Received on Monday, 18 August 1997 01:26:41 UTC