Jump to content

td under div


abs0lut

Recommended Posts

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<table>
<tr>
<td></td><td></td>
<div id="myDiv" style="display: none">
<input type="text" /><input type="text" /><input type="text" />
</div></tr></table>
<a href="#" onclick="if(document.getElementById('myDiv').style.display=='block'){ document.getElementById('myDiv').style.display='hidden'; } else{ document.getElementById('myDiv').style.display='block';}">Show</a>
</body>
</html>

The 3 input text will show if I click the Show link. I need to table the 3 input text.

please help me...

Link to comment
Share on other sites

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Untitled Document</title>
<SCRIPT>
	function divToggle(){
		if(document.getElementById('myDiv').style.display == ''){
			document.getElementById('myDiv').style.display = 'none'; 
			document.getElementById('show').innerHTML = '<a href="javascript:void(0);" onclick=divToggle();>Show</a>';
		}else{
			document.getElementById('myDiv').style.display = '';
			document.getElementById('show').innerHTML = '<a href="javascript:void(0);" onclick=divToggle();>Hide</a>';
		}
	}
</SCRIPT>
</head>

<body>
<table>
	<tr>
		<td></td>
		<td>
			<div id="myDiv" style="display:none"><input type="text" /><input type="text" /><input type="text" /></div>
		</td>
	</tr>
</table>

<DIV NAME="show" ID="show"><a href="javascript:void(0);" onclick=divToggle();>Show</a></DIV>

</body>

</html>

Link to comment
Share on other sites

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<table>
<tr>
<td>text1</td><td>text2</td><td>text3</td>
<div id="myDiv" style="display: none">
<input type="text" /><input type="text" /><input type="text" />
</div></tr></table>
<a href="#" onclick="if(document.getElementById('myDiv').style.display=='block'){ document.getElementById('myDiv').style.display='hidden'; } else{ document.getElementById('myDiv').style.display='block';}">Show</a>
</body>
</html>

I forgot text1, text2 and text3 before the div.. I need to structure the three text fields with a table.. When they click the show button it will show the input fields only..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.