kallend 2,184 #1 February 5, 2007 When I'm filling out my particulars on a web form, why do I have to switch from typing for name and street/city address to a pull down menu for the state? Why do I then have to switch back again for the zip code? If I enter the zip code, why can't it figure out for itself the state and city anyway? Enquiring minds want to know.... The only sure way to survive a canopy collision is not to have one. Quote Share this post Link to post Share on other sites
Butters 0 #2 February 5, 2007 To much resources and work ..."That looks dangerous." Leopold Stotch Quote Share this post Link to post Share on other sites
PhreeZone 20 #3 February 5, 2007 It could be coded to do look ups for that but that usually then needing to invoke lots of additional code to do the reference and then to refresh the page to populate those boxes before letting you move to the next field. Its a lot of coding for not that much gain but I've seen it done before.Yesterday is history And tomorrow is a mystery Parachutemanuals.com Quote Share this post Link to post Share on other sites
bob.dino 1 #4 February 5, 2007 A couple of reasons: - it's extra work - you can't embed the translation tables in the web page - they're too big. - last time I checked USPS wanted money for zip code <--> address translation. None of those are deal-breakers, but they do mean that most sites don't do it automatically. Quote Share this post Link to post Share on other sites
ExAFO 0 #5 February 5, 2007 there's a small Manx kitten in the server who's geographically impared.Illinois needs a CCW Law. NOW. Quote Share this post Link to post Share on other sites
NWFlyer 2 #6 February 5, 2007 1) You usually don't have to switch from typing. If you wanted to select, say, WA, you would tab over to the state field and type "W" which would bring up WA in the drop down menu. If you typed "W" again, you'd get WI, and so on through WV and WY. 2) The zip to state matching would require validation against another data source... in most cases, web sites don't want to bother."There is only one basic human right, the right to do as you damn well please. And with it comes the only basic human duty, the duty to take the consequences." -P.J. O'Rourke Quote Share this post Link to post Share on other sites
pilotdave 0 #7 February 5, 2007 It can be done, but it requires a lot of code... For example: http://www.codeproject.com/Ajax/AjaxWebServices.asp. Dave Quote Share this post Link to post Share on other sites
kallend 2,184 #8 February 6, 2007 QuoteA couple of reasons: - it's extra work - you can't embed the translation tables in the web page - they're too big. - last time I checked USPS wanted money for zip code <--> address translation. None of those are deal-breakers, but they do mean that most sites don't do it automatically. Oh, lazy bastard reasons. I understand now.... The only sure way to survive a canopy collision is not to have one. Quote Share this post Link to post Share on other sites
narcimund 0 #9 February 6, 2007 It's not quite like that... The zip code does determine the state (actually, the first two digits determine the state!) but it does NOT determine the city. There are cities with more than one zip code and zips with more than one city. So the zip code literally cannot be used to auto-set the city accurately. But having the form auto-set the state is actually quite easy. It's not a large database: it's only 51 lines (including DC) and not hard to implement. Nor do you have to buy the data -- it's trivially available. Hmmm. Maybe I should do that on the sites I administer. -- BTW: In Canada, the Postal Code actually narrows down to a single BLOCK in most cases. I've seen websites with address pages that have you type the postal code then just ask "Which of the following 3 street addresses is yours: 2104 (*) 2106 ( ) 2108 ( )" First Class Citizen Twice Over Quote Share this post Link to post Share on other sites