Hello,
I have a problem with the “onchange” of my form.In fact I have three form “combo” type
and I want the second “combo” is sorted according to the content value of the first “combo”, and that the third “combo” is sorted according to the content value of the second “combo” ;
I tried to do it like this:
if(name=="ajouteritineraire")
{
dpItineraire2 = new dataProcessor("s_Mission.php");
dhxWinsItineraire2 = new dhtmlXWindows();
modalItineraire2= dhxWinsItineraire2.createWindow(1, 550, 300, 530, 180);
modalItineraire2.setText("Création d'un itinéraire");
modalItineraire2.setModal(true);
modalItineraire2.denyResize();
modalItineraire2.center();
modalItineraire2.keepInViewport(true);
FormBtnItineraire2 = modalItineraire2.attachForm(ItineraireData2);
FormBtnItineraire2.attachEvent("onChange", function(name,value, is_checked)
{
//FormBtnItineraire2.load("villeptions2.php?v="+value);
if (name !== 'modetransport')
{
alert('transport');
return true;
}
depart = FormBtnItineraire2.getCombo('depart');
depart.load("villeptions2.php?d="+value);
arrivee = FormBtnItineraire2.getCombo('arrivee');
arrivee.load("villeptions2.php?a="+depart.getSelectedText());
return true;
}
);}
but it does not work;
Thank you for making me a little support!