summaryrefslogtreecommitdiff
path: root/httemplate/misc/xmlhttp-cust_main-censustract.html
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2010-11-05 19:05:57 +0000
committercvs2git <cvs2git>2010-11-05 19:05:57 +0000
commitaaf8baf3662e16e9414de236a39f8801a8c41b01 (patch)
tree2cda603e4311b3e80f79b93d9bcce3a7c7c2d053 /httemplate/misc/xmlhttp-cust_main-censustract.html
parent995a145c931164347683071c95c6754379d36604 (diff)
parent9b2de4257b6a2877434008188e52b8ef71ff339d (diff)
This commit was manufactured by cvs2svn to create branch
'FREESIDE_2_1_BRANCH'.
Diffstat (limited to 'httemplate/misc/xmlhttp-cust_main-censustract.html')
-rw-r--r--httemplate/misc/xmlhttp-cust_main-censustract.html21
1 files changed, 16 insertions, 5 deletions
diff --git a/httemplate/misc/xmlhttp-cust_main-censustract.html b/httemplate/misc/xmlhttp-cust_main-censustract.html
index 9d588d712..3ba68afd4 100644
--- a/httemplate/misc/xmlhttp-cust_main-censustract.html
+++ b/httemplate/misc/xmlhttp-cust_main-censustract.html
@@ -36,23 +36,32 @@ if ( $sub eq 'censustract' ) {
my $content = $res->content;
my $p = new HTML::TokeParser \$content;
my $viewstate;
+ my $eventvalidation;
while (my $token = $p->get_tag('input') ) {
- next unless $token->[1]->{name} eq '__VIEWSTATE';
- $viewstate = $token->[1]->{value};
- last;
+ if ($token->[1]->{name} eq '__VIEWSTATE') {
+ $viewstate = $token->[1]->{value};
+ }
+ if ($token->[1]->{name} eq '__EVENTVALIDATION') {
+ $eventvalidation = $token->[1]->{value};
+ }
+ last if $viewstate && $eventvalidation;
}
- unless ($viewstate) {
+ unless ($viewstate && $eventvalidation ) {
- $error = "no __VIEWSTATE found";
+ $error = "either no __VIEWSTATE or __EVENTVALIDATION found";
} else {
my($zip5, $zip4) = split('-',$arg{zip});
+ #ugh workaround a mess at ffiec
+ $arg{year} = " $arg{year}" unless $arg{year} = "2010";
my @ffiec_args = (
__VIEWSTATE => $viewstate,
+ __EVENTVALIDATION => $eventvalidation,
ddlbYear => $arg{year},
+ ddlbYear => ' 2009',
txtAddress => $arg{address},
txtCity => $arg{city},
ddlbState => $arg{state},
@@ -62,6 +71,7 @@ if ( $sub eq 'censustract' ) {
warn join("\n", @ffiec_args )
if $DEBUG;
+ push @{ $ua->requests_redirectable }, 'POST';
$res = $ua->request( POST( $url, \@ffiec_args ) );
warn $res->as_string
if $DEBUG > 1;
@@ -74,6 +84,7 @@ if ( $sub eq 'censustract' ) {
my @id = qw( MSACode StateCode CountyCode TractCode );
$content = $res->content;
+ warn $res->content if $DEBUG > 1;
$p = new HTML::TokeParser \$content;
my $prefix = 'UcGeoResult11_lb';
my $compare =