Re: CFFUNCTION called on REFRESH
> What you probably want to do is submit the form back to the server > "onclick", then use coldfusion to check what the user selected and > call the correct function. Thanks a lot Peter. I followed your suggestion. I created a CF page that has all CF code. The onClick Javascript basically just points to that CF page. The CF page processes the session data and point back to the Javascript page. It works perfectly. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255214 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFFUNCTION called on REFRESH
I realize that my post is too long. So this is the code after trimming and commenting: (I use finaltotal array because string or number cannot be passed by reference to cffunction)function hello(checkboxes, index) { checkbox = checkboxes[index]; if(!checkbox) { checkbox = checkboxes; } var temp = 0; if(checkbox.checked) { temp = #increasetotal(session.finaltotal)#; } else if (!checkbox.checked){ temp = #decreasetotal(session.finaltotal)#; } window.location.reload(); } http://www.annistonmorningrotary.org/temp/confirmpremium.cfm";> ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255001 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFFUNCTION called on REFRESH
I realize my code is too long and not clear. This is the code after trimming and commenting: (I use finaltotal array because string or number cannot be passed by reference to cffunction)function hello(checkboxes, index) { checkbox = checkboxes[index]; if(!checkbox) { checkbox = checkboxes; } var temp = 0; if(checkbox.checked) { temp = #increasetotal(session.finaltotal)#; } else if (!checkbox.checked){ temp = #decreasetotal(session.finaltotal)#; } window.location.reload(); } http://www.annistonmorningrotary.org/temp/confirmpremium.cfm";> ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255006 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4