problems hiding form elements. (please help)

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

    #1

    problems hiding form elements. (please help)

    I am trying to hide a drop down box in a form on a jsp page using the:

    style.visibilit y="hidden";

    The form element is hidden ok but my problem is that the space still
    exists where the element is.

    Can anyone tell me how to hide these elements so that they dont mess up
    the layout of my form. Anyhelp would be much appreciated.

    thanks.
    Clive


    --
    Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
  • Martin Honnen

    #2
    Re: problems hiding form elements. (please help)



    Clive Moore wrote:
    [color=blue]
    > I am trying to hide a drop down box in a form on a jsp page using the:
    >
    > style.visibilit y="hidden";
    >
    > The form element is hidden ok but my problem is that the space still
    > exists where the element is.
    >
    > Can anyone tell me how to hide these elements so that they dont mess up
    > the layout of my form. Anyhelp would be much appreciated.[/color]

    Use
    if (elementObject. style) {
    elementObject.s tyle.display = 'none'
    }
    to hide an element and
    if (elementObject. style) {
    elementObject.s tyle.display = '';
    }
    that way you hide elements with IE4+, Netscape 6+ and Opera 7 so that
    they do not longer consume layout space

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    Working...