Hi,

Suppose you have a table REACTION  with 2 fields : type, and value.

If you have a Create form for REACTION, the options you can choose for
value, depends on your type selection. Therefore you need ajax.

I guess this is quite standard. None of the slices I think can be used
in this context...

This seems to be more complex then I was expecting...

Can someone give me some advice on this issue ?

Thanks

Mathias





2012/8/15 Mathias <mathias.v.da...@gmail.com>:
> {{extend 'layout.html'}}
>   <select id="list1">
>     <option>option 1</option>
>     <option>option 2</option>
>   </select>
>
>   <select id="list2">
> ...
>   </select>
>
> <script>
>     var selectedOption=''
>     function returnSelectedOption() {
>       selectedOption = $("#list1").val();
>       AJAX Call
>          }
>
>     $("select").change(returnSelectedOption);
> </script>
>
>
> Hello,
>
> I know there were already some posts concernig this subject, but
> unfortunately these could not help me.
>
> I want to create a Ajax cascade drop down list, without using the already
> provided slices/solutions.
>
> I have an idea on how to implement it, but I am stuck a bit.
>
> As you can see, I know how to catch the selected option in a javascript
> variabele, but then I have do an AJAX call,
>
> to catch the javascript variabele in a controller function.
>
> What would be the simplest way, to do this, and how ?
>
> I can't use the standard Ajax function here ? (ajax(url, [name1, name2,
> ...], target)
>
> I guess I have to use $.ajax() ...
>
> I tried lots of things, but I was not able to pass the js variabele in a
> function.
>
> How should I implement this Jquery function ?  Suppose my controller
> function is cascade/default/ajax.
>
> How can I catch the js variabele in cascade/default/ajax ?
>
> Any help would be gratefully appreciated !
>
> Thanks
>
> Mathias
>
> --
>
>
>

-- 



Reply via email to