diff options
author | ivan <ivan> | 2005-09-10 14:50:57 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-09-10 14:50:57 +0000 |
commit | 9e342300c380e29af1b9678f1a9604609e0061b6 (patch) | |
tree | 72d0edb8de70b19465264c76669045b0ba202e6e /httemplate/edit/cust_main.cgi | |
parent | 3502e0627909ea99683d1724adb0d4a3fee578b2 (diff) |
ajax-style xmlhttprequest state/county/country selector!
Diffstat (limited to 'httemplate/edit/cust_main.cgi')
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index a8f202fbb..d10b21a4a 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -173,11 +173,17 @@ function bill_changed(what) { <% for (qw( last first company address1 address2 city zip daytime night fax )) { %> what.form.ship_<%=$_%>.value = what.form.<%=$_%>.value; <% } %> + what.form.ship_country.selectedIndex = what.form.country.selectedIndex; - ship_country_changed(what.form.ship_country); - what.form.ship_state.selectedIndex = what.form.state.selectedIndex; - ship_state_changed(what.form.ship_state); - what.form.ship_county.selectedIndex = what.form.county.selectedIndex; + function fix_ship_state() { + what.form.ship_state.selectedIndex = what.form.state.selectedIndex; + } + ship_country_changed(what.form.ship_country, fix_ship_state ); + + function fix_ship_county() { + what.form.ship_county.selectedIndex = what.form.county.selectedIndex; + } + ship_state_changed(what.form.ship_state, fix_ship_county ); } } function samechanged(what) { |