Eric,
>Is there a specific or easy way to set session variables while in the
>middle of a javascript routine? I can't seem to recall...thanks.
JavaScript executes on the client where as CF executes on the server. You
can't have JavaScript directly affect the outcome of the current running
template. That means you can't do:
var aJSVariable = prompt("Your name:");
<cfset session.name = aJSVariable />
Now that's not to say that you can't use JavaScript to change the value of a
session variable for sequential requests. There are a couple of ways to
accomplish this, but they are revolve having the browser talk back to the
server:
1) Update a form variable and then submit the form back to the server.
2) Use a hidden iframe to post back to a fixed URL to update the server.
3) Use the Image() object in JS to post to a fixed URL to update the server.
4) Use AJAX to update the server.
-Dan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230944
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54