Skip navigation
Currently Being Moderated

Cfdiv bind to cfselect returning multiple values?

Apr 3, 2012 10:30 AM

Tags: #cfdiv #bind #cfselect

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.




More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points