make entire form invisible

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

    #1

    make entire form invisible

    Hello,
    How can I make a form (tag = "<form>") invisible ?

    <form id = "myform"> ...

    myform.style.vi sibility = "hidden"; // this doesn't work !!!

    Thanks :)


  • Lasse Reichstein Nielsen

    #2
    Re: make entire form invisible

    "Mr. x" <a@b.com> writes:
    [color=blue]
    > How can I make a form (tag = "<form>") invisible ?
    >
    > <form id = "myform"> ...
    >
    > myform.style.vi sibility = "hidden"; // this doesn't work !![/color]

    How doesn't it work? How is it called? In which browser?

    The try:
    document.forms['myform'].style.visibili ty="hidden";
    or
    document.getEle mentById("myfor m").style.visib ility="hidden";

    It is very bad style to just assume that the form's name can be used
    as a global variable. It breaks in many browsers.

    /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

    • Stuart Palmer

      #3
      Re: make entire form invisible

      I'd create a div round the <form> </form> and then hide the contents of the
      div.

      Stu

      "Mr. x" <a@b.com> wrote in message news:3fbac1ab$1 @news.012.net.i l...[color=blue]
      > Hello,
      > How can I make a form (tag = "<form>") invisible ?
      >
      > <form id = "myform"> ...
      >
      > myform.style.vi sibility = "hidden"; // this doesn't work !!!
      >
      > Thanks :)
      >
      >[/color]


      Comment

      • Vjekoslav Begovic

        #4
        Re: make entire form invisible

        "Mr. x" <a@b.com> wrote in message news:3fbac1ab$1 @news.012.net.i l...[color=blue]
        > Hello,
        > How can I make a form (tag = "<form>") invisible ?
        >
        > <form id = "myform"> ...
        >
        > myform.style.vi sibility = "hidden"; // this doesn't work !!![/color]

        It does work, at least in IE. Problem is somewhere else.


        Comment

        Working...