Can someone explain the best way to check if JavaScript is enabled and redirect to another page if it is not enabled? I tried to add the <NO Script> tag to the head section of my page but I'm receiving "META" tag cannot be nested in NO SCRIPT. Can someone
please help?
simply place an anchor element there in between the noscript element. If things are not automatically via javascript then it means those people have turned it off for a reason. Perhaps they're visually impared and their screen reading device needs the time
to be able to read and pronounce it to them.
Update:
However, you can’t use noscript inside the
head to provide alternatives for JavaScript functions, as that would involve writing content inside the
head element.
VBJunkie
Member
36 Points
55 Posts
Check if javascrip is enabled?
May 28, 2012 03:02 PM|LINK
Can someone explain the best way to check if JavaScript is enabled and redirect to another page if it is not enabled? I tried to add the <NO Script> tag to the head section of my page but I'm receiving "META" tag cannot be nested in NO SCRIPT. Can someone please help?
nilsan
All-Star
16962 Points
3725 Posts
Re: Check if javascrip is enabled?
May 28, 2012 03:15 PM|LINK
You're doing it the correct way, just disable JavaScript in your browser and execute your page with your code (Meta tag).
Blog | Get your forum question answered | Microsoft Community Contributor 2011
XIII
All-Star
182709 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: Check if javascrip is enabled?
May 28, 2012 03:16 PM|LINK
Hi,
simply place an anchor element there in between the noscript element. If things are not automatically via javascript then it means those people have turned it off for a reason. Perhaps they're visually impared and their screen reading device needs the time to be able to read and pronounce it to them.
Update:
However, you can’t use
noscriptinside theheadto provide alternatives for JavaScript functions, as that would involve writing content inside theheadelement.Taken from http://reference.sitepoint.com/html/noscript
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
MahadTECH
Star
8976 Points
1659 Posts
Re: Check if javascrip is enabled?
May 28, 2012 03:16 PM|LINK
These will be helpfull i also got Help.. from them
Good luck`
Mahad Bin Mukhtar
Remember to Mark the replies as Answers
The easiest day was 'yesterday'.
MCP, MCSD
For .NET TECH Blog
mohith.net
Member
115 Points
72 Posts
Re: Check if javascrip is enabled?
May 29, 2012 09:37 AM|LINK
<no script> tag can be only implemented within the<body> tags.
Bangalore's City Information Directory!
VBJunkie
Member
36 Points
55 Posts
Re: Check if javascrip is enabled?
Jun 02, 2012 03:47 PM|LINK
Can you show me an example? When I place it in the hear or body I receive error messages stating "meta" cannot be nested.
Ruchira
All-Star
43068 Points
7045 Posts
MVP
Re: Check if javascrip is enabled?
Jun 03, 2012 12:48 PM|LINK
Hello,
That's correct. As far as I know, you cannot include a meta tag within a no script tag.
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.