Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: Prevent Drop-downs from showing Date: Sat, 08 Nov 2014 19:47:12 +0100 Organization: solani.org Lines: 22 Message-ID: References: <37302ad5-2e60-4a3a-ab43-9c3bbb95ac5c@googlegroups.com> <081120141808229639%timstreater@greenbee.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1415472422 7662 eJwFwQERADEIAzBLwNoCcvjt8C/hEx65bkIUuNzeVNlr7Zw3Vx5F+OaraJXW6dAASfvSon8N4w/7 (8 Nov 2014 18:47:02 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sat, 8 Nov 2014 18:47:02 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 X-User-ID: eJwNx8kBwCAIBMCWJLArlsMh/Zdg5jdQCmsbQcNg3CKTAo2I0ltybe1eKX4Oe8Qxwn9cyW/QDyS4ESc= In-Reply-To: <081120141808229639%timstreater@greenbee.net> Cancel-Lock: sha1:X1smnKcvOMeFgjjYtdYdUqd2PaA= X-NNTP-Posting-Host: eJwNxsERwDAIA7CVYmK7YRwKl/1HaPWStuF+aJm6unXTGaXlGbYTp/efDCIMgurCnHG+yxh+EQcQcA== Xref: csiph.com comp.lang.javascript:26102 Tim Streater wrote: > In article , Denis McMahon > wrote: > >> I thing the code behind the web pages should be detecting invalid >> combinations and bouncing them back to the user to correct, rather >> than submitting the invalid data to peoplesoft. > > Invalid combinations should not even be possible. Your first dropdown > should list countries. Having selected a country, you load the second > dropdown with state/province/county as appropriate. This could all be > hardwired into the app, or, better, make an ajax call to obtain th > edata you need to load the second dropdown with, including whether it's > to be loaded with states,counties, or provinces. However, you can't have reliable validation on the client, so it's always necessary to validate on the server. -- Christoph M. Becker