Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2006-04-20
6
Medium Priority
?
288 Views
Last Modified: 2013-12-24
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.
0
Comment
Question by:rodgerch
  • 4
  • 2
6 Comments
 
LVL 9

Expert Comment

by:73Spyder
ID: 16498805
<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()"
0
 

Author Comment

by:rodgerch
ID: 16498916
Thanks,

Can you help me with the JavaScript?
0
 
LVL 9

Accepted Solution

by:
73Spyder earned 2000 total points
ID: 16498938
onChange = "submit()"
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
LVL 9

Expert Comment

by:73Spyder
ID: 16498958
Or onchange="this.form.submit();"
0
 

Author Comment

by:rodgerch
ID: 16499051
Works great! thanks!
0
 
LVL 9

Expert Comment

by:73Spyder
ID: 16499078
glad to have helped
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

580 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