1 Reply Latest reply on Apr 11, 2012 7:10 AM by Aquitaine

    Cfdiv bind to cfselect returning multiple values?

    Aquitaine Level 1

      Hi there,


      This is something that's bugged me for a while because I can't figure out if my understanding of what's going on is bad or if something else is going on. This is in CF8 Standard.


      I have a page that lists a bunch of sports teams based on the logged-in user. You select one of those teams and then get a sub-page (cfdiv) that lets you do stuff with that team. Generally:


      <cfselect name="teamID" bindonLoad="true" value="teamID" bind="cfc:component.getTeamsIWant(loggedinUser)" />


      Then later on:


      <cfdiv id="div1" bind="url:sub-page.cfm?teamID={teamID}">


      This works great: once. The problem arises if you choose one selection and then choose another: the teamID it is passing to the cfdiv gets tacked on to the end of the previously selected teamID, so that the URL parameter starts out as:




      Then if you change your selection, it goes




      ...and so on, until it finally gets so big that it exceeds the maximum length of a GET string and breaks (if you change your mind one too many times).


      Is it possible to 'wipe' the existing teamID value when a new one is selected? I don't need to remember previous selections.