By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,594 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

make entire form invisible

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
"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

P: n/a
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

P: n/a
"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.