469,951 Members | 2,625 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,951 developers. It's quick & easy.

make entire form invisible

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

<form id = "myform"> ...

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

Thanks :)
Jul 20 '05 #1
3 10503
"Mr. x" <a@b.com> writes:
How can I make a form (tag = "<form>") invisible ?

<form id = "myform"> ...

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


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

The try:
document.forms['myform'].style.visibility="hidden";
or
document.getElementById("myform").style.visibility ="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 - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
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:3f********@news.012.net.il...
Hello,
How can I make a form (tag = "<form>") invisible ?

<form id = "myform"> ...

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

Thanks :)

Jul 20 '05 #3
"Mr. x" <a@b.com> wrote in message news:3f********@news.012.net.il...
Hello,
How can I make a form (tag = "<form>") invisible ?

<form id = "myform"> ...

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


It does work, at least in IE. Problem is somewhere else.
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Susan Bricker | last post: by
reply views Thread by Emmanouel | last post: by
16 posts views Thread by Miguel Dias Moura | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.