4 Replies Latest reply on Dec 7, 2006 1:02 PM by Newsgroup_User

    cfscript and js disabled browsers

    Level 7
      Hi All

      I can't seem to find a definitive answer to this question so can anyone
      answer me. will the JavaScript written inside a <cfscript> block still run
      if the client has JavaScript disabled in their browser. I guess I mean. Will
      this JavaScript be run by the server or is it still sent to the browser??

      TY

      Bill


        • 1. Re: cfscript and js disabled browsers
          Level 7
          Hi All

          I can't seem to find a definitive answer to this question so can anyone
          answer me. will the JavaScript written inside a <cfscript> block still
          run if the client has JavaScript disabled in their browser. I guess I
          mean. Will this JavaScript be run by the server or is it still sent to
          the browser??

          TY

          Bill


          Your question begs a question, what do you mean by the JavaScript
          written inside a <cfscript> block?


          Because, the CFML script that is used inside a <cfscript> block IS NOT
          JAVASCRIPT. YES, the CFML script will run, it is part of the CF server
          side stuff that builds the response that is returned to the requesting
          browser.

          Now it is of course quite simple to use CFML script to generate dynamic
          JavaScript that is returned with the response to be run on the client.
          And, of course, this JavaScript will not run on browsers with JavaScript
          disabled.
          • 2. Re: cfscript and js disabled browsers
            Kevin Schmidt Level 1
            Javascript = client side
            <cfscript> = server side
            • 3. Re: cfscript and js disabled browsers
              Level 7
              CFScript is just a different set of logic control structures for CFML,
              nothing more. The processing it does is identical, and the end result is
              the same. All output from any CF processing is passed back to the
              webserver and then to the browser, and it's up to the browser to decide how
              to deal with it (render it, execute it, ignore it, etc).

              CFScript has nothing to do with server-side JavaScript.

              --
              Adam
              • 4. Re: cfscript and js disabled browsers
                Level 7
                Thanks all

                Each answers my question.

                Bill