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
https://forums.phpfreaks.com/topic/116891-td-under-div/
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
https://forums.phpfreaks.com/topic/116891-td-under-div/#findComment-601894
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
https://forums.phpfreaks.com/topic/116891-td-under-div/#findComment-602119
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.