Re: noscript and validation

by "Donna Smillie" <dms(at)zetnet.co.uk>

 Date:  Mon, 4 Nov 2002 22:13:20 -0000
 To:  <hwg-techniques(at)mail.hwg.org>
 References:  1
  todo: View Thread, Original
I  would think it would be easier to do this:

<.script type="text/javascript" language="JavaScript"><.!--
document.write("<.a href='javascript: goOrder()'>order<\/a>")
.//-->
</script>
<.noscript>
<.a href="https://order.shtml?referrer=noscript">order</a>
</noscript>

- and that should solve the validation problem too.

Regards,
Donna

----- Original Message -----
From: Greg Hart <ghhart(at)earthlink.net>
To: <hwg-techniques(at)mail.hwg.org>
Sent: Monday, November 04, 2002 7:15 PM
Subject: noscript and validation


> I am trying to decide which method of using <.noscript> within a link is
> correct. Both methods seem like hacks, but I cannot find another way to
> have both java and non-java browsers see the identical link. Both methods
> below function the same, and appear the same. Method One validates, Method
> Two does not...I'm hung up on the fact that the one that does validate
> SHOULDN'T in my mind. A browser without JS would see two </a> back to
back,
> while the non-validating method would only have one closing anchor for
> either scenario....and yet the first way is the right one according to the
> W3C validator.
>
> Everything works either way, so it's not a question of functionality...but
> what's the RIGHT way to do this? Or maybe another way entirely?
>
> TIA,
>
> Greg Hart
>
> ----------------
> Method One:
>
> <.a href="javascript: goOrder()"><.script type="text/javascript"
> language="JavaScript"><.!--
>   document.write("order");
>   file://--></script><.noscript><.a
> href="https://order.shtml?referrer=noscript">order</a></noscript></a>
>
> Method Two:
>
> <.a href="javascript: goOrder()"><.script type="text/javascript"
> language="JavaScript"><.!--
>   document.write("order");
>   file://--></script><.noscript><.a
> href="https://order.shtml?referrer=noscript">order</a></noscript><.script
> type="text/javascript" language="JavaScript"><!--
>   document.write("<\/a>");
>   file://--></script>
>
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA