How to use "onchange" in cfselect to perform the action of the form rather than using the submit button.

Posted on 2006-04-20
Last Modified: 2013-12-24
The page I'd like to change can be found at:
My form uses a submit button to perform the action, but I'd rather not have a button.  I'd like it to perform the action with the "onchange" attribute.
Here's my current code:
   <cfform action="products.cfm" method="post" name="category_frm" preloader="no">
       <cfinput name="GetCategory" type="submit" value="Go!">
Thanks for your help.
Question by:rodgerch
    LVL 9

    Expert Comment

       name = "name"
    label = "label"
    style = "style specification"
       size = "integer"
       required = "yes" or "no"
       message = "text"
       onError = "text"
       multiple = "yes" or "no"
       query = "queryname"
       value = "text"
       display = "text"
       group = "query column name"
       queryPosition = "above" or "below"
       selected = "value or list"
    onKeyUp = "JavaScript or ActionScript"
    onKeyDown = "JavaScript or ActionScript"
    onMouseUp = "JavaScript or ActionScript"
    onMouseDown = "JavaScript or ActionScript"
    onChange = "JavaScript or ActionScript"
    onClick = "JavaScript or ActionScript"
    enabled = "yes" or "no"
    visible = "yes" or "no"
    tooltip = "tip text"
    height = "number of pixels" Flash only
    width = "number of pixels" Flash only
    editable="yes" or "no" Flash only
    zero or more HTML option tags

    onChange = "submit()"

    Author Comment


    Can you help me with the JavaScript?
    LVL 9

    Accepted Solution

    onChange = "submit()"
    LVL 9

    Expert Comment

    Or onchange="this.form.submit();"

    Author Comment

    Works great! thanks!
    LVL 9

    Expert Comment

    glad to have helped

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
    If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video discusses moving either the default database or any database to a new volume.

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now