Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ColdFusion <cfselect> and populating the onChange() event with the user selected value.

Posted on 2007-03-27
1
Medium Priority
?
1,741 Views
Last Modified: 2013-12-20
This question is written in regards to the coldfusion tag <cfselect>.

In my <cfselect> tag, I have a recordset successfully populating a list box.  I would like the value attribute to be passed to a JavaScript onChange() event inside of the <cfselect> tag, and it seems like the <cfselect> does not want to give up the value to JavaScript inside it's execution.

I have researched using a <cfloop> or an <cfarray> to do this, but ideally I would like to set the value in the onchange() event of the <cfselect> tag.  That way, I can work with a single user selection once they have made it during the submit form action.

The code examples are a straight-forward <cfselect> for a query so there is really nothing special to note there.  

Thanks in advance for your suggestions.  


0
Comment
Question by:CyprexxDev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 39

Accepted Solution

by:
gdemaria earned 1000 total points
ID: 18803446

  this will pass the value selected to "yourFunction()"...

 <select onChange="yourFunction(this.options[selectedIndex].value);">

0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

715 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