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? Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.