hello Panos
first of all i would like to thank you very much for that nice script that is working for everybody ( except me ) :-D
anyways i've been on it for sometime and i've tried different configurations trying to get it to work.
i've even created a new simple database just to get it to work but no hope
i've taken the example from the zip file and tried to modify it as follows
<script src="prototype.js" type="text/javascript"></script>
<h2><a href="http://www.salix.gr/ajax_linked_selectboxes">Salix.gr - Ajax Linked Select boxes Demo</a></h2>
<?php
$sc_ajax_select_boxes = new sc_ajax_select_boxes();
$sc_ajax_select_boxes->xml_encoding='ISO-8859-1'; // use this property if you need other encoding than latin
$sc_ajax_select_boxes->add_select_box('areas','a_id','a_name','','','sel1','sel_id_1','');
$sc_ajax_select_boxes->add_select_box('countries','c_id','c_name','','','sel2','sel_id_2','');
$sc_ajax_select_boxes->link_select_boxes('sel1','sel2','a_id','');
$sc_ajax_select_boxes->place_jscripts();
$sc_ajax_select_boxes->show_select_box('sel1');
$sc_ajax_select_boxes->show_select_box('sel2');
?>
All i get is the entries in the a_name in areas table in first select box, but the second select box is always 'none'
any help would be appreciated
Hi,
I dont want to live with this complaint, give a try to this. In the line
$sc_ajax_select_boxes->link_select_boxes('sel1','sel2','a_id','');
change a_id to c_id as reference says
[www.salix.gr]
that is the field in the where clause of the second select box
Pls even if you dont plan to use linked select boxes give this a try.