Skip to main content
July 2, 2009
Question

populate session variable by cfselect

  • July 2, 2009
  • 1 reply
  • 395 views

how can i assign a session variable as soon as a cfselect option is selected...

    This topic has been closed for replies.

    1 reply

    ilssac
    Inspiring
    July 2, 2009

    You can't

    Session variables are in memory on the server.

    Your select control is in memory on the client.,

    These two memory locations can be thousands of miles apart and have no idea what is going on in the other location.

    The only way to have the results of the select control on the client put into session memory on the server is to send the data from the client to the server.

    You can do that by submitting the form which triggers the browser to send a request to the server.

    You can do that by using a JavaScript function triggered on an event on the select to build a request and send it to the sever with the XMLHttpRequest object.  Normaly this is refered to by the buzzword "AJAX".