4 Replies Latest reply on Apr 20, 2006 12:55 PM by robspot

    cfselect and cfloop help

    robspot
      I am working on an event calender application. What I am trying to achieve is to have 2 drop down lists with the months of the year in them. I want the selection from the first list field to define the starting point for the second list field. For example. The first choice from the 12 months is March. So I want the second box, located on the same page, to have from March to December as options. Then there is a submit button.

      Then, below, on the same page, I would like to have a dynamic calender generated for the events between the months selected from the form. I have the calender section completed using a db query to populate the table with the events.

      I can get this to mostly work by having the form on one page submit to the calender on another page though I cannot get the second list field to update based on the value passed from the first list field, I would really like this to work on a single page so that the user can resubmit different date combinatons on the fly.

      Any help anyone can provide me with would be greatly appreciated. Thanks in advance.
        • 1. Re: cfselect and cfloop help
          robspot Level 1
          I figured out how to combine them into one page using IsDefined(Form.submit), but the form is replaced by the claender results. I would like to keep the form visible so users can make multiple selections without having to click a back button to access the form.

          I also still need to figure out how to have the 2nd list field update from the results of the 1st list field.
          • 2. Re: cfselect and cfloop help
            Dan Bracuk Level 5
            Use frames or iframes.
            • 3. Re: cfselect and cfloop help
              robspot Level 1
              I am using a webhosting service so I am unable to use CFX tags and I would like to stay away from frames.

              I sthere some other way I can accomplish this?
              • 4. Re: cfselect and cfloop help
                robspot Level 1
                Ok..i have the page working almost completely right now.

                I used IsDefined("Form.Submit"> in a <CFIF> <CFELSE> statement to get the form to submit the results to the same page, then i added a second copy of the form to the top of the reselts section of the calender so that the form is always present for use on the page.

                The only thing I need help with now is making the second list box update it's choices from the selection of the first list box in the same form. Any ideas?

                I can post code iff it will help any, but it is getting rather lengthy.