TreeLoader and baseParams with array
I'm a real newbie to all this I looked around for example but I could not really find one.
I want my TreeLoader to pass extra parameters in the request. The problem is basically that I want to pass an array of country.
Basically I would like to pass something which would look like this
/myurl/etc?country=GB&country=CH&yearFrom=1970&yearTo=2007
Now when I use the baseParams to do this in TreeLoader my code looks like this:
loader: new Tree.TreeLoader({
baseParams: {country: ["GB", "CH"], yearFrom: 1970, yearTo:2007},
dataUrl:'/myurl/etc'
})
Unfortunately what is indeed sent is more a request which looks like this:
/myurl/etc?country=GB,CH&yearFrom=1970&yearTo=2007
Does anyone have a suggestion how I could solve this problem? I could parse the string but I would prefer to use the CountryEditor that I currently use!!!
Thanks for your help
Buck
I would suggest parsing the array on the server side. Arrays are converted to comma delimited lists when they are passed through a URL.
#If you have any other info about this subject , Please add it free.# |