You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ah...@ibi.com on 2003/04/01 21:06:52 UTC

On-the-fly disabling of a valid field

hi all,

I have a form page that have a number of required ValidField components.
Whether or not these values get populated depends on radio button check,
i.e.  Do you want enter you full name: yes|no -- if < yes > is selected, the
user will have to enter his full name in < full-name > field; otherwise,
JavaScript is disabling < full-name> field.  Now when page is rewinding
(giving the field will be disabled) I'm getting a JavaScript error due to
.focus() and .select() references to the previously disabled field.  Is
there a way to get around these JavaScript errors??

-Ahmed.


Re: On-the-fly disabling of a valid field

Posted by Tarun Ramakrishna Elankath <ta...@webkadai.com>.
Why don't you check the disabled property before a select() or a focus()
?
The disabled property is read/write in javascript

cheers,
Tarun

On Wed, 2003-04-02 at 00:36, Ahmed_Aly@ibi.com wrote:
> hi all,
> 
> I have a form page that have a number of required ValidField components.
> Whether or not these values get populated depends on radio button check,
> i.e.  Do you want enter you full name: yes|no -- if < yes > is selected, the
> user will have to enter his full name in < full-name > field; otherwise,
> JavaScript is disabling < full-name> field.  Now when page is rewinding
> (giving the field will be disabled) I'm getting a JavaScript error due to
> .focus() and .select() references to the previously disabled field.  Is
> there a way to get around these JavaScript errors??
> 
> -Ahmed.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>