X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fselect-country.html;h=3941f2f931c9be2204a289d82328ff2d3395c420;hp=014effd6633b282f9af4fb361dcf6b056da408f3;hb=929f432c766bbe3bdeed5b80818a12ddf6ec6339;hpb=36693c42cbaca86f6957d5ed6794624810018bb3 diff --git a/httemplate/edit/cust_main/select-country.html b/httemplate/edit/cust_main/select-country.html index 014effd66..3941f2f93 100644 --- a/httemplate/edit/cust_main/select-country.html +++ b/httemplate/edit/cust_main/select-country.html @@ -26,7 +26,7 @@ function <%= $opt{'prefix'} %>country_changed(what, callback) { - country = what.options[what.selectedIndex].text; + country = what.options[what.selectedIndex].value; function <%= $opt{'prefix'} %>update_states(states) { @@ -36,8 +36,8 @@ // add the new states var statesArray = eval('(' + states + ')' ); - for ( var s = 0; s < statesArray.length; s++ ) { - var stateLabel = statesArray[s]; + for ( var s = 0; s < statesArray.length; s=s+2 ) { + var stateLabel = statesArray[s+1]; if ( stateLabel == "" ) stateLabel = '(n/a)'; opt(what.form.<%= $opt{'prefix'} %>state, statesArray[s], stateLabel); @@ -58,13 +58,14 @@