We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    Now that I started using some ajax sugar coating on my websites, I am preocuppied by the degradation of some effect for users with javascript disabled.

    For instance, on this website, I used Effect.Appear and Effect.Fade to show/hide Help and show/hide search form (just under the logo : Aide | Recherche | FAQ).

    Now if I turn off javascript, my effects don’t work of course but what’s not good at all is they can’t access the help menu nor the search box because those effects are set with a default "display: none;" css rule.

    I did a quick search but did not find a method to have a conditionnal testing of javascript to have an alternative implemented for those with js disabled...

    Do you know of such a method ?

    Thanks !
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 6726
      • 7,075 Posts
      Still have to test this, but it would seem I self answered this pretty trivial question : use the <noscript> tag...

      I’ll try that and report...
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l&#39;outil id
        • 10487 MODX Staff
        • 1,535 Posts
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 6726
          • 7,075 Posts
          Thanks Garry for the pointer smiley , but it’s not the same goal grunt_lord pursued with his technique. His very useful tip allow you to have an element hidden on document load (which is exactly what I was looking for yesterday !).

          I was aiming to display an element only for those with javascript disabled, and the noscript tag works fine.
          You can see it in action on this website. Turn Off javascript and you’ll have a nice red background box giving you alternate links for search and help, and also pointing to a page instructing you how to turn javascript on for various browsers.
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id
            • 2762
            • 1,198 Posts
            Quote from: davidm at May 09, 2006, 06:04 AM
            ......
            I was aiming to display an element only for those with javascript disabled, and the noscript tag works fine.
            You can see it in action on this website. Turn Off javascript and you’ll have a nice red background box giving you alternate links for search and help, and also pointing to a page instructing you how to turn javascript on for various browsers.


            Nice solution David wink
              Free MODx Graphic resources and Templates www.tattoocms.it
              -----------------------------------------------------

              MODx IT  www.modx.it
              -----------------------------------------------------

              bubuna.com - Web & Multimedia Design
              • 6726
              • 7,075 Posts
              Thanks Banzai smiley

              I have been meaning to start using ajax in templates for a while now, and also build a template (not done yet, but this summer I’ll have more time and hopefully a good grasp of script.aculo.us... smiley )
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l&#39;outil id