Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing the space where the hidden content is.

Status
Not open for further replies.

Kristian0015

Programmer
Dec 13, 2008
5
NO
I need help solving out a problem here.
On my website, there is a javascript that hides and shows the terms for submitting emails.
My problem is that the space where the hidden content is (fig.1) takes up the space where the submit form should be.
(fig.2) I hope you understand.
I won´t waste space here to paste the source code, as I think most of you know how to get it. (right click > view source).

image:
-Thanks,
Kristian.
 
Ok, here it is:

Code:
<body onload="javascript:hideDiv()">
<div align="center">
<table bgcolor="white" border="0" width="740"><tr><td><br><br><br><br><br><br><br><br>
<p><font face="arial" size="5" color="gray"><center>UnderWearBear Opens</font><br> <font face="arial" size="15" color="#66ff99"><i>1<small>/</small>1 '09</i></font><br><font face="arial" size="3" color="#66ff99">Midnight GMT+1</font></center></p></div></td></tr>
<tr><td><div align="center">
<form action="register.php" method="POST" name="frmComment" onSubmit="return sjekkUtfylling(); ">
<font face="arial" size="1" color="gray"><strong>Don´t miss Underwearbear's opening!</strong><br>Add your email to our email list and you will be notified on the opening day:</font><br><input type="text" size="50" name="fornavn" />
<br><br><font face="arial" size="1" color="gray"><a href="javascript:showDiv()">Terms</font></a>
<div id="hideShow">
<table width="250px" border="0"><tr><td>
<font face="arial" size="1" color="gray">
<ul>
<li>When registering to this email application, your email will <u>only</u> be used to alert you when <b>UnderWearBear.com</b> opens.</li>
</ul><a href="javascript:hideDiv()"><center>Hide Terms<center></a></font></p>
</td></tr></table>
</div>
<input type="submit" name="Send" value="Submit">
</div>
</td></tr></table>
<div>
</div>


</body>
 
I´m sorry about the broken image link.
Here is a new, working one:

website_trouble.PNG
 
In your code, use
Code:
hideShow.style.display='none';
to hide the div, and
Code:
hideShow.style.display='';
to show the div.

Lee
 
I don´t get this, something don´t work.
I think I might put it in the wrong place, where in the code would you put it? in the <style> ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top