noscript - Terminating the code if javascript is not found -


im trying show message if there no javascript enabled in browser using , want not further proceed load page. im using php did

<?php exit;?> 

in noscipt though browser has javascript enabled php code exit works... code used this:

<noscript>         <div style="text-align:center; margin-top:15px; color:#f00; margin-bottom:10px;text-decoration: blink;">             <h1>                 please enable javascript<br style="margin-bottom: 5px;"/>                 <h3>else system not work correctly.</h3>             </h1>         </div>         <div align="center">             <div class="title" style="font:bold 18px arial">enabling javascript</div>             for: <strong>firefox</strong>             go to:<strong>options > content</strong><br/> , check enable javascript.             <br/>or<br/>             refer link enable javascript according browser<br/>             <a href="http://www.enable-javascript.com/">http://www.enable-javascript.com/</a>             <?php exit;?>         </div>     </noscript> 

what should not proceed further if javascript not enabled , should proceed if js enabled...

noscript blocks executed when javascript disabled, , used display alternative content.

<noscript>     <b>you don't have javascript enabled.</b> </noscript> 

or can redirect user page if javascript disabled.

<!doctype html> <html lang="en">     <head>         <noscript>             <meta http-equiv="refresh" content="0; /?javascript=no">         </noscript>         <meta charset="utf-8"/>         <title></title>     </head> </html> 

in php code can check

if(isset($_get['javascript']) && $_get['javascript'] == 'no') {     exit; } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -