Anshul wrote:
I want to check through perl whether javascript is enabled or disabled
in mozilla browser.
You would need to use client-side scripting to submit an HTTP request
that is handled by the server-side Perl script if client-side script
support is enabled. For example:
<script type="text/javascript">
var img = new Image();
img.src = "http://foo.example/bar.pl?js=1";
</script>
Or, for another example, you could use XMLHttpRequest/IXMLHTTPRequest
for that. All solutions (have to) use a host object, and neither one is
guaranteed to be supported.
If it is disabled I want to display a message to
user to enable it. What code can I use please help.
Not possible using a server-side script without prior user interaction,
since it can only "know" when client-side script support is enabled as
the former has to be "notified" by the latter.
I tried "navigator.javaEnabled() but it is in javascript again. If
javascript will be disabled so browser can neither read this code
even.
You don't need any programming:
<noscript>...</noscript>
However, your approach is most likely wrong. Websites should work
without client-side script support.
PointedEars