There's no really simple way. The best way to go, in my opinion, is to assume that users won't have Javascript (or that they have it disabled) and make your site as functional as possible.
That said, you might try some sort of cookie magic; Javascript is supposed to be able to set cookies, so you could put some Javascript in the login page that will set a cookie indicating that Javascript is enabled. (You'll need a login page for that ... but that might be as simple as the site's index page) Then have your Perl scripts check to see if that cookie value is set, and those scripts can then act on that information.
<update> here's some code
<head> <script type='text/javascript'> <!-- document.cookie='javascript=1; expires= ' +nextyeartoGMTString(); // that's a durable cookie! // --> </script>
and then something like Adam's approach'll do ya for reading the cookies. </update>
This is not foolproof, though : not every user will have cookies turned on, either.
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
In reply to Re: Perl & JavaScript
by arturo
in thread Perl & JavaScript
by akm2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |