Then why not put another alert() BEHIND the $.ajax(...)? I bet this time it does not fire, indicating that your $.ajax(...) does contain some error. I assume you don't need more hint right now? :-)
On May30, 6:09pm, Neveen Adel <[email protected]> wrote: > But still didn't call the function get_objective_category() > > On May 30, 12:44 pm, Neveen Adel <[email protected]> wrote: > > > > > I tested it by putting alert() function as > > > $("#project_project_category").change(function() { > > alert("======>"); > > $.ajax('get_objective_category', > > ['project_project_category'],'project_project_objective' ) > > }) .change(); > > > and it works fine. > > > On May 30, 12:36 pm, Iceberg <[email protected]> wrote: > > > > Very likely your javascript has some error. Perhaps the latest > > > "change()" is not good. > > > > On May30, 5:29pm, Neveen Adel <[email protected]> wrote: > > > > > Hello, > > > > > i tried it but it didn't call the action? > > > > > i did the following : > > > > > In html Page: > > > > $("#project_project_category").change(function() { > > > > $.ajax('get_objective_category', > > > > ['project_project_category'],'project_project_objective' ) > > > > }) > > > > .change(); // making sure the event runs on initialization for > > > > default value > > > > > where > > > > get_objective_category: is the function > > > > 'project_project_category' : is the drop down id that i take the > > > > selected value from it > > > > project_project_objective: is the id of the drop down that its values > > > > will be computed according to the selection of the previous drop down. > > > > > And finally in default.py i wrote: > > > > def get_objective_category(): > > > > print "=====================>" > > > > print request.vars.project_category > > > > return dict() > > > > > But The print statements didn't printed so it didn't call the > > > > function? > > > > > could anyone help me ? > > > > > Thanks in Advance

