By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,819 Members | 2,073 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,819 IT Pros & Developers. It's quick & easy.

onClick not working in cfform tag

P: 3
Please help a newb! Any suggestions are appreciated!

My goal is to have all checkboxes=true up to today's month when the "Fiscal Year" checkbox is clicked. Right now, I'm having trouble with the checkbox updating. I haven't even started with the Date=Now(mmmm) function. If you can help with that too, great!

Here's what I have so far:

Expand|Select|Wrap|Line Numbers
  1. <cfform format="flash" name="SearchField" skin="haloorange" height="350" width="400" action="viewRecords_results.cfm">
  2. <cfformgroup type="horizontal" label="Select Month(s)">
  3. <cfinput name="month1" label="January" type="checkbox">
  4. <cfinput name="month7" label="July" type="checkbox">
  5. <cfinput name="month2" label="February" type="checkbox">
  6. <cfinput name="month8" label="August" type="checkbox">
  7. <cfinput name="month3" label="March" type="checkbox">
  8. <cfinput name="month9" label="September" type="checkbox">
  9. <cfinput name="month4" label="April" type="checkbox">
  10. <cfinput name="month10" label="October" type="checkbox">
  11. <cfinput name="month5" label="May" type="checkbox">
  12. <cfinput name="month11" label="November" type="checkbox">
  13. <cfinput name="month6" label="June" type="checkbox">
  14. <cfinput name="month12" label="December" type="checkbox">
  15. <cfinput name="fiscal" label="Fiscal Year" type="checkbox"
  16. onClick="(SearchField.month10.checked=true)">
  17. </cfformgroup>
  18. </cfform>
Thanks for looking!
Sep 18 '06 #1
Share this Question
Share on Google+
2 Replies


100+
P: 143
Please help a newb! Any suggestions are appreciated!

My goal is to have all checkboxes=true up to today's month when the "Fiscal Year" checkbox is clicked. Right now, I'm having trouble with the checkbox updating. I haven't even started with the Date=Now(mmmm) function. If you can help with that too, great!

Here's what I have so far:

Expand|Select|Wrap|Line Numbers
  1. <cfform format="flash" name="SearchField" skin="haloorange" height="350" width="400" action="viewRecords_results.cfm">
  2. <cfformgroup type="horizontal" label="Select Month(s)">
  3. <cfinput name="month1" label="January" type="checkbox">
  4. <cfinput name="month7" label="July" type="checkbox">
  5. <cfinput name="month2" label="February" type="checkbox">
  6. <cfinput name="month8" label="August" type="checkbox">
  7. <cfinput name="month3" label="March" type="checkbox">
  8. <cfinput name="month9" label="September" type="checkbox">
  9. <cfinput name="month4" label="April" type="checkbox">
  10. <cfinput name="month10" label="October" type="checkbox">
  11. <cfinput name="month5" label="May" type="checkbox">
  12. <cfinput name="month11" label="November" type="checkbox">
  13. <cfinput name="month6" label="June" type="checkbox">
  14. <cfinput name="month12" label="December" type="checkbox">
  15. <cfinput name="fiscal" label="Fiscal Year" type="checkbox"
  16. onClick="(SearchField.month10.checked=true)">
  17. </cfformgroup>
  18. </cfform>
Thanks for looking!
onClick="(SearchField.month10.checked=true)" should be

onClick="(SearchField.month10.checked='checked')"
Sep 19 '06 #2

P: 3
Thanks for the reply!

I couldn't get it to work using your code but I did get the variable to return as "true" using onClick="(SearchField.month10=true)"

The only thing that doesn't happen is the actual check being placed in the box. Not a big deal, since I can instruct my users to not expect it, but it would be nice if I can get it to work. Any ideas?
Sep 19 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.