Link to home
Start Free TrialLog in
Avatar of rodgerch
rodgerch

asked on

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

The page I'd like to change can be found at:
http://www.wiebe-carlson.com/products.cfm
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">
        <cfselect
             enabled="Yes"
             name="category_sel"
             size="1"
             multiple="no"
             query="rsCategories"
             value="CatNum"
             display="Category">
       </cfselect>
       <cfinput name="GetCategory" type="submit" value="Go!">
  </cfform>
Thanks for your help.
Avatar of 73Spyder
73Spyder

<cfselect
   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
</cfselect>



onChange = "submit()"
Avatar of rodgerch

ASKER

Thanks,

Can you help me with the JavaScript?
ASKER CERTIFIED SOLUTION
Avatar of 73Spyder
73Spyder

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or onchange="this.form.submit();"
Works great! thanks!
glad to have helped