disabling form input elements

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bill

    disabling form input elements

    Hi.

    Is there any way to make form input elements inactive, ie to disable them?

    I've seen such a thing in VB but can't find anything in HTML/Javascript
    references.

    Thanks.


  • Lasse Reichstein Nielsen

    #2
    Re: disabling form input elements

    "Bill" <someone@here.c om> writes:
    [color=blue]
    > Is there any way to make form input elements inactive, ie to disable them?[/color]

    There are different ways, depending on what you mean by disable:

    formElem.disabl ed = true;

    Setting it "disabled" means that you can't use it (edit text, click
    button), and it isn't sent when the form is submitted.

    formElem.readOn ly = true;

    A text (input/textarea) can be set readOnly. Then it just can't be
    changed, but is still submitted.
    [color=blue]
    > I've seen such a thing in VB but can't find anything in HTML/Javascript
    > references.[/color]

    What did you write in VB?

    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    Working...