Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #26097

Re: Prevent Drop-downs from showing

Newsgroups comp.lang.javascript
Subject Re: Prevent Drop-downs from showing
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <37302ad5-2e60-4a3a-ab43-9c3bbb95ac5c@googlegroups.com> <XnsA3DE5A5541384eejj99@194.109.133.133> <m3j0va$ro7$1@speranza.aioe.org>
Date 2014-11-07 21:43 +0100
Message-ID <XnsA3DEDCF9CC28Ceejj99@194.109.133.133> (permalink)

Show all headers | View raw


Joao Rodrigues <groups_jr-1@yahoo.com.br> wrote on 07 nov 2014 in 
comp.lang.javascript:

> On 07-11-2014 05:52, Evertjan. wrote:
>> DrKen <javajedi2@yahoo.com> wrote on 07 nov 2014 in comp.lang.javascript:
>> 
>>> I'm trying to modify a web page that uses hard-coded values in XML for
>>> countries and states.  However, we are getting errors because users
>>> might select a country from the country drop-down list, say, Australia,
>>> but also choose a U.S. state.  Our main student information system,
>>> PeopleSoft, chokes on invalid combinations like that, even though the
>>> web page does not.  
>> 
>> Methinks using clientside to hide serverside coding errors is the wrong 
>> approach.
> 
> The OP didn't mention any "serverside coding errors".

False!

"Our main student information system, PeopleSoft, chokes on invalid 
combinations like that,"

So the serverside is not programmed correctly, as it should be able to 
respond to "invalid" input from in a conssistent way and not "choke"

> I understood the
> web application is using XML files (or XML data) to populate the
> drop-down menus, but it could be using JSON instead. So he might write
> some client-side JavaScript in order to prevent the odd combinations
> between countries and states.

He might, but it is silly to need to have inconsistencies of the serveride 
cloaced by clientside code.

>>>    I'm no expert at JavaScript, and I would like a little guidance on
>>>    how to check the country drop-down value as soon as it is selected.
>> 
>> use <select onchange='..'
>> 
>> [This part is just html]
>>  
>>>    If it is "Untied States" or "Canada," the user is allowed to pick a
>>>    state. If it is any other country, which is unlikely,  I want to
>>>    blank out any state value and prevent the state dropdown form
>>>    appearing or if it is already visible, hide it. I know how to respond
>>>    to the "Submit button," but this is more complex.  
>> 
>> It seems you know very little of scripting, 
>> perhaps it would be better to hire a professional,
>> or first learn more?
> 
> I hate terms like "professional", "engineer" that don't tell nothing
> nowadays. 

Don't expect to get a free ride without doing yur own best,
I s what I mean. 

> For instance, see John Resig who created jQuery and wrote a
> book called "Pro JavaScript Techniques", oh boy! Not happy with that
> title, he wrote the "Secrets of the JavaScript Ninja" six years later...
> If you use Resig's Pro techniques you'll become a real NINJA (no income,
> no job, no asset).

Using jQuery as a positive example, that is laughable.


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Prevent Drop-downs from showing DrKen <javajedi2@yahoo.com> - 2014-11-06 19:34 -0800
  Re: Prevent Drop-downs from showing "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-11-07 08:52 +0100
    Re: Prevent Drop-downs from showing Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-11-07 13:56 +0100
    Re: Prevent Drop-downs from showing Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2014-11-07 15:53 -0200
      Re: Prevent Drop-downs from showing "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-11-07 21:43 +0100
        Re: Prevent Drop-downs from showing Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-11-08 01:56 +0100
  Re: Prevent Drop-downs from showing Denis McMahon <denismfmcmahon@gmail.com> - 2014-11-08 14:08 +0000
    Re: Prevent Drop-downs from showing Tim Streater <timstreater@greenbee.net> - 2014-11-08 18:08 +0000
      Re: Prevent Drop-downs from showing "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-11-08 19:47 +0100
        Re: Prevent Drop-downs from showing Denis McMahon <denismfmcmahon@gmail.com> - 2014-11-08 21:20 +0000

csiph-web