Open Source & Stuff  
  |     Main Site     |      Forum     |     Contact     |
Ajax Linked Select boxes :  forum.Salix.gr forum.Salix.gr
Comments, questions, usage, bugs. 
Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
messageCant get to work. Please help
Posted by: BLOOP! (IP Logged)
Date: August 25, 2009 06:05PM

Hi!

I have been trying to get the script to work. Right now i have 2 Selects that im trying to link but it wont work. The script eventually get to 4 (Country -> State -> City -> Zip)

Heres the snippet:
$sc_ajax_select_boxes->add_select_box('countries','countries_id','countries_name','countries_id','','sel1','sel_id_1','');
$sc_ajax_select_boxes->add_select_box('zones', 'zone_id', 'zone_name', 'zone_id','','sel2','sel_id_2','');
$sc_ajax_select_boxes->link_select_boxes('sel1','sel2', 'zone_country_id','');
$sc_ajax_select_boxes->place_jscripts();
$sc_ajax_select_boxes->show_select_box('sel1');
$sc_ajax_select_boxes->show_select_box('sel2');

And heres the table structure:

"countries" table:
countries_id - int
countries_name - varchar
countries_iso_code_2 - char
countries_iso_code_3 - char
address_format_id - int

"zones" table:
zone_id - int
zone_country_id - int
zone_code - varchar
zone_name - varchar

link: [www.myblankeeinc.com]

I dont know if im missing something obvious here but anyhow thanks for the help in advance!

messageRe: Cant get to work. Please help
Posted by: numen (IP Logged)
Date: November 01, 2009 02:06AM

missing a link_select_boxes,
maybe you can try add this before place_jscripts()

$sc_ajax_select_boxes->link_select_boxes('sel2','sel2', 'zone_country_id','');

messageRe: Cant get to work. Please help
Posted by: panos (IP Logged)
Date: November 06, 2009 03:23AM

in your demo page there prototype library is not loadedp.
pls add a
<script src="prototype.js" type="text/javascript"></script>



Sorry, only registered users may post in this forum.

All Rights Reserved 2006 Salix.gr  |  Design by Ades Design |  Hosting by e-emporio |  forum.Salix.gr powered by Phorum