<noscript> tags not working anywhere

Hy!

I’m using the <noscript> tags in main.php layout file inside the body to show a msg if javascript is disabled but they are not working. Neither in firefox nor in chrome. They simply dont show up in the page source. What am i doing wrong? Spent the last 2 hours trying to solve this!

provide snippets of your code… how you put this <noscript> tag in code?

Finally I can post answers again…

Here’s the complete code I use in my project to achieve exactly the same issue you are asking for.

css/head part:




<style>

#activateJavaScriptMessage {

  width: 100%;

  height: 100%;

  opacity: 0.9;

  z-index: 100;

  position: absolute;

  top: 0;

  left: 0;

  background-color: black;

  font-weight: bold;

  margin: 0;

  padding: 0;

  overflow: hidden;

}


#activateJavaScriptMessage table * {

  color: red;

  font-size: 30px;

  text-align: center;

}

</style>



body part:




<noscript>

  <div id="activateJavaScriptMessage"><table width="100%" height="100%" border="1"><tr><td valign="middle" align="center">Please activate JavaScript</td></tr></table></div>

</noscript>



I was using this before. And I have tried also what Yiingeneur has posted too but noscript tags are not working in chrome aswell as in firefox.

<body>

&lt;noscript&gt;


     &lt;style type=&quot;text/css&quot;&gt;


         .mainDiv {display:none;}


     &lt;/style&gt;


     &lt;div class=&quot;noscriptmsg&quot;&gt;


         hBuddy requires javascript in order to function properly. Please enable javascript and refresh the page.


     &lt;/div&gt;


&lt;/noscript&gt;

I’ve tried this in /views/site/index.php and it works there

Fahd, as I suggested in the PM, I think it’s not a Yii issue but the HTML Problem. So please post the entire HTML output, then I can help. I just tested my solution in Chrome and FF8 and it works as expected. Maybe your Javascript is still turned on in these browsers? =)

Ragards,

Yiingeneur

Output of the browser? Because therez nothing there. Just that noscript tags dont show up at all. and no I’ve checked the javascript it is turned off.

what do you mean by nothing there? if there’s nothing, it means the problem is elsewhere and not a noscript-tag problem. how do you detect that it is not working?