Hi,
please i want to know how i can set the property of elements.
Here i want to set the value of select’s options of a select item when another change the value. E.g:
{view:"select", placeholder:"Ville",options:"../adminis/control/ph.extraFile/ville.json", id:"ville", name:"ville", on:{'onChange':'get_grp()'}}. OnChange of this item, i want to change the options of following select:
{view:"select", placeholder:"Groupe", options:"../adminis/control/ph.extraFile/groupe.json", id:"grp", name:"grp"}
knowing that the option change with json file.
Sorry but ii don’t speak very well english so i hope u’ll can help me and that it’s comprehensible.
Thank you
hi maria,
Thanks for your answer. i try your code but it doesn’t work.
Here is what i have done
var nomV = $$(‘ville’).getValue();
if($$(“grp”)) $$(“grp”).define(“options”,“control/phmetier/listeGroupe.php?ville=”+nomV);
But when i try there is no one values options.
i want to if i can write that:
$$(“grp”).define(“options”,“data/groupe.json”) knowing that i can generate the json’s file when the select option “ville” change?
hi maria,
Yes i called define(“option”,url) method from onChange event handler, but not answer. It’s for that i’m asking you if url can be a link from a json’s file?
hi maria,
i’ve found the problem. In fact, in my php’s file, i forgot to post the request’s result that i recove in the option’s select.
So your solution is correct.
Sorry for the trouble.