[Rails] Re: How to: Check if Javascript is enabled
Tom Ha wrote:
> Hi there,
>
> Rails has fantastic Javascript helpers, which I have immediately used
> for my website.
Actually, Rails has terrible JS helpers: they encourage a poor style of
programming where JS is mixed into HTML. Generally, this is not a good
idea.
>
> Since some features of my website now rely 100% on Javascript being
> enabled in the user's browser, I now need a way to either:
> a) block the usage of the site when Javascript is disabled, or
> b) display a very visible message that tells the user to enable
> Javascript.
The <noscript> tag will work, or you could have a message in the HTML
that your JS code will remove.
>
> Has anybody good ideas for a plugin (or some other solution) to check if
> Javascript is enabled and to then let the user know?
>
> (I know, a good programmer would let the site work without JS as well,
> but currently, I'm not there yet...)
Get there! Read about progressive enhancement.
>
> Thanks a bunch for any help with this!
> Tom
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home