User login |
Let me introduce you to my usual debuging methodLet me introduce you to my usual debuging method for Linked Select boxes class. First edit sc_classes.php and somewhere near line 580 you will see the line: var myAjax = new Ajax.Request( url, { method: 'POST', parameters: pars, onComplete: onCompleteCallBack }); just before that add the following line: $("dump_area").innerHTML = pars; Next, in the page you placed select boxes, add somewhere a div <div id="dump_area"></div> Now refresh page and make a selection in the first box. In the div you will get parameter mydomain.com/sc_select_ajax_handler.php?linkval=2&table=lsd_demo_2 (concatenate those four lines to one) if it works you will get an xml document with select options for the second select box. This will give you information about the cause of the problem. if that returns options for select box with out php error messages then db connection and parameters are correct. Now next issue to check is if javascript points to the file correctly. Go back to sc_classes.php and change $("dump_area").innerHTML = pars; to $("dump_area").innerHTML = url; and refresh page and make a new selection (like before) Those 2 things are usualy give me the solution. And last note, openDB() sould not be commented in sc_select_ajax_handler.php because it is runned stand alone, no main application db connection present at that state. |