feri_soft Posted September 30, 2006 Share Posted September 30, 2006 i have this xajax script for chaines selects:[code]<select id='select1' name='select1' onchange="xajax_chain(this.value)"><option value="1">1</option><option value="2">2</option></select><?phpfunction chain($selectValue){ $objResponse = new xajaxResponse(); $objResponse->addAssign('select2','options.length',0); //get values of second select based on first here switch($selectValue) { case '1': $objResponse->addScript('addOption("select2","option11");'); $objResponse->addScript('addOption("select2","option12");'); break; case '2': $objResponse->addScript('addOption("select2","option21");'); $objResponse->addScript('addOption("select2","option22");'); break; } return $objResponse;}?>[/code]i could not ake it working can you give me any suggestions? Link to comment https://forums.phpfreaks.com/topic/22573-ajax-chained-selects/ Share on other sites More sharing options...
ober Posted October 2, 2006 Share Posted October 2, 2006 Sorry, I don't have any experience with xajax... have you worked with any of their examples? Link to comment https://forums.phpfreaks.com/topic/22573-ajax-chained-selects/#findComment-102267 Share on other sites More sharing options...
Barand Posted October 10, 2006 Share Posted October 10, 2006 The sample AJAX application in my sig shows chained selects Link to comment https://forums.phpfreaks.com/topic/22573-ajax-chained-selects/#findComment-107132 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.