2 Replies Latest reply on Jan 22, 2009 2:15 PM by Newsgroup_User

    Javascript to Coldfusion

    Level 1
      How can I pass a value from javascript into coldfusion array?

        • 1. Re: Javascript to Coldfusion
          Level 7
          dchard wrote:
          > How can I pass a value from javascript into coldfusion array?
          > Thanks

          That same ways you pass any data from the Client PC on your desk to the
          server, where ever that is.

          This question is a common one indicating a lack of understanding that
          ColdFusion runs on the server and JavaScript runs on the client and
          never shall the two meet.

          You can use ColdFusion to build JavaScript before it is sent to the
          client, including data. This is a very powerful thing.

          JavaScript can send data from the client to a ColdFusion web page that
          does any of the normal things that such a web page does with data it
          receives. This is done in any of the normal manners, through Cookies,
          URL (aka get) or form (aka post) variables. This happens with a normal
          request to the web server.

          With an asynchronous JavaScript request, this can be done behind the
          scenes by the client browser, making for a more seamless user experience.

          But in the end JavaScript and ColdFusion, while they can be coaxed into
          passing data on, never work together.
          • 2. Re: Javascript to Coldfusion
            Dan Bracuk Level 5
            With great difficulty. js runs on the client and cf runs on the server, so, you need to make a page request that includes your javascript values as a variable that cf can read.