Can't is such a strong word.

It really just depends on where you want to detect it.  If you want your
servlet to know whether or not JavaScript is enabled, one possible solution
is as follows:

<html>
<script language="JavaScript">
<!--
function checkForJS () {
        document.myForm.jssupport.value = "true";
}
// -->
</script>

<body onLoad = "checkForJS ()">

...html...html...

<form name = "myForm" action = "/servlet/myServlet" method = "post">
<input type = "hidden" name = "jssupport" value = "false">
...
</form>

</body>
</html>

Now, if the value of jssupport is "true" when your servlet is called, then
the browser must have been able to execute JavaScript providing you didn't
set jssupport to "true" or "false" anywhere else in your page and that the
user didn't force it.

Regards,

Brian

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Rosdi
Sedi
Sent: Thursday, June 03, 1999 12:05 AM
To: [EMAIL PROTECTED]
Subject: Re: Detecting JavaScript support


you can't. since you will need some sort of javascript code to do that...


----- Original Message -----
From: Glen Stampoultzis <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 03, 1999 6:39 AM
Subject: Detecting JavaScript support


> What's the easiest way to detect Javascript support in a browser?
>
> -- Glen Stampoultzis
>
>
>
> _____________________________________________________________________
> CAUTION - This message may contain privileged and confidential
> information intended only for the use of the addressee named above.
> If you are not the intended recipient of this message you are hereby
> notified that any use, dissemination, distribution or reproduction
> of this message is prohibited. If you have received this message in
> error please notify Ansett Australia immediately. Any views expressed
> in this message are those of the individual sender and may not
> necessarily reflect the views of Ansett Australia.
> _____________________________________________________________________
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to