ajax-style xmlhttprequest state/county/country selector!
[freeside.git] / httemplate / misc / counties.cgi
1 <%
2
3   my( $state, $country ) = $cgi->param('arg');
4
5   my @counties = 
6      sort
7      map { s/[\n\r]//g; $_; }
8      map { $_->county; }
9      qsearch( 'cust_main_county',
10               { 'state'   => $state,
11                 'country' => $country,
12               },
13             )
14   ;
15
16
17 %>[ <%= join(', ', map { qq("$_") } @counties) %> ]