Is $().SPServices.SPCascadeDropdowns() caching?

Jul 2, 2010 at 10:04 PM

Does $().SPServices.SPCascadeDropdowns() cache results for each of the parent column options? and if so, can it be overwritten or "forced" to get results again?

Here is my scenario:

  1. Parent column is a dropdown
  2. Child column is a multiselect
  3. The call to SPCascadeDropdowns() is inside of a function and uses a value from a text field (user able to free type information) in the CAMLQuery field to further filter the choices.

The call to my function, that in turn calls SPCascadeDropDowns(), is done at page load...  But I also need to "refresh" it when the text field is changed by the user, and that is the part I'm having trouble with... I have bound the "onChange" event to the text field so that when the user changes the value, I call my function and thus it calls SPCascadeDropDowns again with a new set of input options...  But that is not working... (I'm essentially calling SPCascadeDropDowns() multiple times on the same set of fields... not sure if that is currently supported).

 

Thanks for your time.

Paul

 

Coordinator
Jul 4, 2010 at 2:08 PM

Paul:

You're having issues because SPCascadeDropdowns is meant to be called once.  It binds to all of the appropriate events to provide the functionality and then is doing its thing for the page life. Calling it multiple times is not going to work, unfortunately.

What you might want to do is not call SPCascadeDropdowns until you have the text value.   Perhaps even hide the parent and child columns until you have that value.

M.

Jul 5, 2010 at 4:28 PM

Thanks for the reply M.  You confirmed what my assumption was.