General Community > Scripting Help

find out if JS is activated or not

(1/2) > >>

Spaceman-Spiff:
is there a way to find out if javascript is activated/available or not in a browser using http headers or php?

the 'Additional Options...' in SMF looks neat, but what if some people disabled JS, then he/she can't use the attachment feature at all...

Chris Cromer:
<script type="text/javascript">
<!--
document.write("Hello World!")
//-->
</script>
<noscript>Your browser either does not support javascript or it's disabled!</noscript>

Spaceman-Spiff:
hmm... should also we put the stuff inside additional options in post page inside <noscript> then?

Chris Cromer:
Yeah, whatever is in the <noscript> tag gets displayed if the browser doesn't have javascript support, or it's disabled. So the additional options should appear if it isn't enabled.

Spaceman-Spiff:
another way to do it:  make it visible by default and collapse it using js on load

Navigation

[0] Message Index

[#] Next page

Go to full version