Am working on an PHP application that involves multiple plans a user can select. On my Manage Plan page, whenever user selects any plan from a menu a ajax call is sent that calculates plan fee based on database values and displays it to the user. That works fine. My only problem is when Javascript is disabled everything gets messed up. Not only the plan fee doesn't show up (which is obvious) but when user clicks Submit button, the plan gets changed (ideally user should be taken to a checkout page)
Anyways, I tried putting something like this at the top of the page.
<noscript>
Javascript is disabled. Please enable it to continue.
<?php exit(); ?>
</noscript>
So when Javascript is disabled it shows a message and stops right there. But when Javascript is enabled the PHP code in <noscript>
tag too gets exceuted and stops the page from running.
I am wondering when Javascript is enabled why everything inside the tag isn't ignored?