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


Groups > comp.lang.javascript > #28931

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!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
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 22:25:31 +0100
Organization PointedEars Software (PES)
Lines 32
Message-ID <4786816.k7Yo8ENYBU@PointedEars.de> (permalink)
References <72249e91-27c8-4895-ae4d-f4d974e1b85d@googlegroups.com> <n3h27k$52k$1@news.albasani.net> <647cdcc7-b9b8-40d4-acec-598dadd20c02@googlegroups.com> <n3hilo$4up$1@news.albasani.net>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1448918733 25382 eJwFwQEBACAIA7BKCvxoHBHfP4IbnJM3g2BAUNa2WK0ZmPf5yEqtuse4Ed0mjcZ+JsoX63wdIxFy (30 Nov 2015 21:25:33 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Mon, 30 Nov 2015 21:25:33 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwFwYEBwCAIA7CXdLYI5wCW/09YwmPb+sJo4HDK50tnt1gzIdUOz4bZqlwHGf2uPCwuMjdAleIsRj2h9AOAzRaW
Cancel-Lock sha1:pYPSHfAlYaidM5boYjE9/PxzmnA=
X-NNTP-Posting-Host eJwFwQEBwCAMAzBLdGvLLwcG8y+BRGm4Ji1TrQYjb7iFyUFjM3RU4RwFrJX1ea/bA3/X4X78WxCy
Xref csiph.com comp.lang.javascript:28931

Show key headers only | View raw


Stefan Weiss wrote:

> 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')
                          ^ has to be =

>>     {$("#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.

It would show only one error message, a

> […] syntax error […]

as this code does not compile.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

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