[ic] zip search for admin/entry.html
Scott Andreas
webteam at wes-state.com
Fri Oct 8 14:37:26 EDT 2004
hello list,
I'm adding a zip search for city state and zip automation into the
admin/entry page. I have it searching the zips database and it pulls in the
correct information much like the customer search function does. My problem
is when I update the shipping funtion all the data for the user is removed
on refresh. My code is...
@_UI_STD_HEAD_@
[calc]
return unless $CGI->{customer};
%$Values = ();
$Values->{customer_id} = $CGI->{customer} eq 'NEW' ? '' : $CGI->{customer};
return;
[/calc]
[calc]
return unless $CGI->{zip};
%$Values = ();
$Values->{zip_id} = $CGI->{zip};
return;
[/calc]
.
.
.
[set Get]
mv_nextpage=__UI_BASE__/zip_select
mv_change_frame=select
mv_todo=back
[/set]
[if value zip_id]
[loop prefix=zip list=`$Values->{zip_id}`]
<TR>
<TD NOWRAP>
<INPUT TYPE=text NAME=city VALUE="[value name=city default="[zip-data
zips city]"]" size=20>
</TD>
<TD NOWRAP>
[error name=state std_label="[L]State/Province[/L]" required=1]
</TD>
<TD NOWRAP>
<INPUT onChange="check_avail(this.form)" MAXLENGTH=2
TYPE=text NAME=state VALUE="[value name=state default="[zip-data zips
state]"]" size=2>
</TD>
<TD NOWRAP>
[error name=zip std_label="[L]Zip/Postal Code[/L]" required=1]
</TD>
<TD NOWRAP>
<INPUT TYPE=text NAME=zip VALUE="[value name=zip default="[zip-data zips
zip]"]" size=10> <INPUT TYPE=submit NAME=mv_click VALUE="Get">
</TD>
</TR>
[/loop]
[else]
<TR>
<TD NOWRAP>
<INPUT TYPE=text NAME=city VALUE="[value name=city default="[loop-data
userdb city]"]" size=20>
</TD>
<TD NOWRAP>
[error name=state std_label="[L]State/Province[/L]" required=1]
</TD>
<TD NOWRAP>
<INPUT onChange="check_avail(this.form)" MAXLENGTH=2
TYPE=text NAME=state VALUE="[value name=state default="[loop-data userdb
state]"]" size=2>
</TD>
<TD NOWRAP>
[error name=zip std_label="[L]Zip/Postal Code[/L]" required=1]
</TD>
<TD NOWRAP>
<INPUT TYPE=text NAME=zip VALUE="[value name=zip default="[loop-data
userdb zip]"]" size=10> <INPUT TYPE=submit NAME=mv_click VALUE="GET">
</TD>
</TR>
[/else]
[/if]
if i just comment out the calc section for cgi->zip then all is working
except for the zip search function doesn't work..duh!
When I get this to work I'm willing to but this up for all to use along with
the +70,000 row database. It would be a nice feature
Any help would be grateful
Thanks
Scott Andreas
More information about the interchange-users
mailing list