I am testing my noscript tags which display content when javascript is disabled, this works in Safari, Chrome, Firefox, Camino, IE6, IE7, IE8, IE9, basically everything but Opera (I'm running version 11, not sure if its isolated to that version).
In Opera 11 nothing is displayed... is the noscript tag not supported? and what is the alternative?
Nothing surprising:
<noscript>Please enable JavaScript.</noscript>
Located between the body tags.
<html>
<body>
<script>alert('Hello World');</script>
<noscript>Hello World!</noscript>
</body>
</html>
Usage of NoScript tag: The tag defines alternate content that will be displayed if the user has disabled script or browser does not support script. It can be used inside both <head> and <body> tag.
To test the noscript tags, you can use an HTML validator to ensure you've placed the <noscript> tags in valid / legal places in your HTML. Other than that, just view your pages with JavaScript disabled to see the effect. Thanks - so the iframe stuff should be taken out of the noscript tag, correct?
The <noscript> tag defines an alternate content to be displayed to users that have disabled scripts in their browser or have a browser that doesn't support script.
<noscript>: The Noscript element The <noscript> HTML element defines a section of HTML to be inserted if a script type on the page is unsupported or if scripting is currently turned off in the browser.
Are you sure you disabled javascript in Opera:
Menu >> Settings >> Preferences >> Content >> Deselect "Enable Javascript"
If so, then post the contents of your entire file here.
EDIT
Until they fix this bug in version 11 which I reckon will happen shortly you can try this:
<script type="text/javascript">
<!--
document.write("<style type='text/css'>.noScript { display: none; }</style>");
//-->
</script>
<span class="noScript">Please enable javascript in your browser.</span>
You are basically using javascript to show css which hides the no script message, but if javascript is disabled then there is no way that css can be displayed hence the message will show.
Uh, yeah. We (as in Opera) broke <noscript>
in Opera 11. Known bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With