[thelist] Javascript off CSS on hide elements in page

Christian Heilmann lists at onlinetools.org
Mon Mar 28 04:20:58 CST 2005


Tony Crockford wrote:

>Hi all,
>
>I have a site (sorry, protected by NDA ) that has some javascript
>submits and "jump" menus  I want to provide functionality for users
>surfing with javascript off, and have provided <noscript> wrapped
>alternatives.
>
>what I wanted to do was turn off (display:none) the elements that
>needed javascript when they are replaced by their noscript
>equivalents.
>  
>
That sounds like a rather complicated and  buggy way of achieving  that 
functionality. If you have functionality that is dependent  on 
Javascript, then create these elements via Javascript. Create them via 
the DOM rather than messing about inside the markup with document.write.
http://www.onlinetools.org/articles/unobtrusivejavascript/
http://www.onlinetools.org/tools/puredom/

HTH
Chris




More information about the thelist mailing list