Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Re: Disabling Multiple Fields from Select Box *Very Frustrating!!!!!!!!!


Message #1 by "Tim Austin" <tdaustin@i...> on Tue, 4 Feb 2003 16:28:09 +1100
The script does not work as soon as a put in the backets.  I get no error
but the script does not work.

Am i coding the wrong way or what?

Help would be much appreciated

Tim

My code is

<script>
function Disable1()
{
         if (document.OnlineApplication.LAStatus.value!='Own / Buy')
         {
                document.OnlineApplication.LAPeriodYears.disabled=true;
    document.OnlineApplication.LAMorRep.disabled=true;
         }
         else
         {
                 document.OnlineApplication.LAPeriodYears.disabled=false;
     document.OnlineApplication.LAMorRep.disabled=false;
        }
         if (document.all)
         {
                setInterval("Disable1()",100);
         }
}
</script>
----- Original Message -----
From: "Greg Griffiths" <greg2@s...>
To: "JavaScript HowTo" <javascript_howto@p...>
Sent: Tuesday, February 04, 2003 7:23 AM
Subject: [javascript_howto] Re: Disabling Multiple Fields from Select Box


> Try following the syntax of the language :
>
> ><script>
> >function Disable1()
> >{
> >         if (document.OnlineApplication.LAStatus.value!='Own / Buy')
>
>          {
>
> >                 document.OnlineApplication.LAPeriodYears.disabled=true;
>
>          }
>
> >         else
>
>          {
>
> >                 document.OnlineApplication.LAPeriodYears.disabled=false;
> >         }
> >         if (document.all)
>
>          {
>
> >                 setInterval("Disable1()",100);
>          }
>
> ></script>
>
>
snipped


  Return to Index