I have just write a small code which hide the SECOND COLUMN OF CELL when the user clicks on the link. It works well in IE, but the formatting of Second Column disturb in FIREFOX.
If someone fix it, then it will help me very much.
To hide the second column, just refresh the code.
Here is my code:
Code: Select all
<!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 language="javascript">
function hide(){
document.getElementById('second').style.display = 'none';
}
function showcolumn(){
// Toggle visibility between none and inline
document.getElementById('second').style.display = 'inline';
}
</script>
</head>
<body onload=hide()>
<table border="1" width="80%" align="center">
<tr>
<td onclick="showcolumn()"><a href="#">Click me</a> </td>
<td id="second">Second Row</td>
<td id="third">Third Row</td>
</tr>
</table>
</body>
</html>