View Single Post
  #1 (permalink)  
Old 08-25-2008, 05:07 AM
evuseem evuseem is offline
Registered User
 
Join Date: Aug 2008
Posts: 5
help with this code

I have the followin code whose output is chopping out the topmost portion of the table with id=home (last table). I am not sure wat is wrong. Please help me thank you.

HTML Code:
<html>
<head>
<title>Admin Form</title>
<script language="javascript">
  function change_it(itemID){
      // Toggle visibility between none and inline
      if ((document.getElementById(itemID).style.display == 'none'))
      {
        document.getElementById(itemID).style.display = 'inline';
      } else {
        document.getElementById(itemID).style.display = 'none';
      }
  }
  
  function close_it(itemID){
    document.getElementById(itemID).style.display = 'none';
  }

</script>

</head>
<body>
<table>
  <h6 id="li">To make changes<a href="#" onClick="change_it('li1') & change_it('li2')"> Click here</a> :</h6>
  <table id="li1" name="login" style="display:none;">
           <tr>
            <td><h4>LOGIN</h4></td>
           </tr>
           <tr>
             <td align="right">Username:</td>
             <td><INPUT NAME='Text' TYPE='textbox'></td>
            </tr>
			<tr>
			  <td>Password:</td>
			  <td><input type="password"></td>
		 	  <td></td>
			</tr>
  </table>
</table>

<input type="Submit" id="li2" value="SUBMIT" onClick="change_it('menu_tbl') & close_it('li1') & close_it('li2') & close_it('li')" style="display:none;">
<!---------------->

		<table id="menu_tbl" cellpadding=5 style="display:none;" size=10>
		<tr>
		<td><a href="#h" onClick="change_it('home')">Home</a></td>
		</tr>
		</table>
<br><br>
	
<!------------>	
<table id="home" style="display:none;>
<tr><td>Make changes to Home page here</td></tr>
<tr><td>Title:<input type="text"></td></tr>
<tr><td>Content:<textarea rows="5" cols="30"></textarea></td>
<td><input type="submit" value="PUBLISH"></td>
<td><input type="button" value="DRAFT"></td></tr>
<tr><td>Insert Image(optional):</td>
<td><input type="file" name="upfile"></td></tr>
</table>
</body>
</head>
</html>
thanks, Evu..
Reply With Quote