Sending results to a ColdFusion Variable via OnChange event

Posted on 2005-04-20
Medium Priority
Last Modified: 2013-12-16
I am fairly new to CF and I am trying to assign the selected item from a listbox to a CF Variable for further processing. Here is the trimmed down code:

<!--- Defualt value --->
<cfset Variables.Dept = "ALL">
<!--- Not sure what to put under the "onChange" event. I need something like Variables.Dept =         this.value --->
<select name="lstDept"  onChange="????????????????">

Any suggestions?

Thanks In Advance
Question by:htmoore
LVL 53

Accepted Solution

COBOLdinosaur earned 375 total points
ID: 13828824
Cf functions run on the server before the page is sent.  If you want to bring a client side value back into CF, you have to submit it on a form, the client ans server operate independently of each other



Expert Comment

ID: 13830629
Sounds like your trying to do something like dependent drop down boxes?

I have a page where you select a group and from that choice, the list of group members is presented in another drop down


function updateSecEng()
ifrHidden.location = 'updateProjectPage.cfm?priEng=' + document.projEntry.pri_eng.value;

in the form:
<select name="pri_eng"  style="width: 225px;" onchange="updateSecEng();">
LVL 25

Expert Comment

by:James Rodgers
ID: 13832430
there is a cf ta on EE

and if you are looking for related selects in CF try this

if you are not looking for related selects we will need more information in order to help you out


Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question