[freeside-commits] freeside/httemplate/misc states.cgi, NONE,
1.1 counties.cgi, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Sat Sep 10 07:50:59 PDT 2005
Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail:/tmp/cvs-serv31587/httemplate/misc
Added Files:
states.cgi counties.cgi
Log Message:
ajax-style xmlhttprequest state/county/country selector!
--- NEW FILE: counties.cgi ---
<%
my( $state, $country ) = $cgi->param('arg');
my @counties =
sort
map { s/[\n\r]//g; $_; }
map { $_->county; }
qsearch( 'cust_main_county',
{ 'state' => $state,
'country' => $country,
},
)
;
%>[ <%= join(', ', map { qq("$_") } @counties) %> ]
--- NEW FILE: states.cgi ---
<%
my $country = $cgi->param('arg');
my @states =
sort
map { s/[\n\r]//g; $_; }
map { $_->state; }
qsearch( 'cust_main_county',
{ 'country' => $country },
'DISTINCT ON ( state ) *',
)
;
%>[ <%= join(', ', map { qq("$_") } @states) %> ]
More information about the freeside-commits
mailing list