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


Groups > comp.lang.javascript > #28929

Re: trying to disable a text input field when a particular select list option is selected in a select field but this code has no effect

Path csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail
From Stefan Weiss <krewecherl@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: trying to disable a text input field when a particular select list option is selected in a select field but this code has no effect
Date Mon, 30 Nov 2015 14:24:08 +0100
Organization albasani.net
Lines 21
Message-ID <n3hilo$4up$1@news.albasani.net> (permalink)
References <72249e91-27c8-4895-ae4d-f4d974e1b85d@googlegroups.com> <n3h27k$52k$1@news.albasani.net> <647cdcc7-b9b8-40d4-acec-598dadd20c02@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace news.albasani.net t2igU63cq4Ff8ocWR+MSwisw1W4oYSEQ53kdF+Zg54tQgQT/dnWjgSmMftYs4sEQU3nIPq0nWrI9DMF2sjhWjw==
NNTP-Posting-Date Mon, 30 Nov 2015 13:24:08 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="poLMpopZSB5BQl3rkM8M9bXt+LOJWHmnS27Y8v4rsPwW6cN5UJqoXStA+nVVDXaGPPyeGZZGyo+Z4KlimZucnmI/adhE7VuHOcg4BXWDLgT6Z3KdNwlewp1cQcwMm5Hh"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To <647cdcc7-b9b8-40d4-acec-598dadd20c02@googlegroups.com>
Cancel-Lock sha1:nSWwhMVD/efpUJ8sY7HBZbhgNUg=
Xref csiph.com comp.lang.javascript:28929

Show key headers only | View raw


On 2015-11-30 13:11, fugee279@gmail.com wrote:
> There's no error in the console This code doesn't work either The
> page loads ok, but the second_field never gets disabled
> 
> <script>
> $(document).ready(function () {
>   $('#first_field').change(function(e) 
>    {
>     if (e.target.value=('Fixed price') {$("#second_field").prop("disabled", true); }
>   })
> })
> </script>

I would be very surprised if this code didn't show at least one error
message in the console.

You're not likely to get a better remote diagnosis until you show more
of your document or post a link. (and fix the syntax error)


- stefan

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


Thread

trying to disable a text input field when a particular select list option is selected in a select field but this code has no effect fugee279@gmail.com - 2015-11-29 20:23 -0800
  Re: trying to disable a text input field when a particular select list option is selected in a select field but this code has no effect Stefan Weiss <krewecherl@gmail.com> - 2015-11-30 09:43 +0100
    Re: trying to disable a text input field when a particular select list option is selected in a select field but this code has no effect fugee279@gmail.com - 2015-11-30 04:11 -0800
      Re: trying to disable a text input field when a particular select list option is selected in a select field but this code has no effect Stefan Weiss <krewecherl@gmail.com> - 2015-11-30 14:24 +0100
        Re: trying to disable a text input field when a particular select list option is selected in a select field but this code has no effect fugee279@gmail.com - 2015-11-30 11:06 -0800
        Re: trying to disable a text input field when a particular select list option is selected in a select field but this code has no effect Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-11-30 22:25 +0100
    Re: trying to disable a text input field when a particular select list option is selected in a select field but this code has no effect Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-11-30 22:43 +0100

csiph-web