Targeting a cell from a cell in a table

windows

Guest
Say if i had a picture in a cell to the left and used it as a link. Would I be able to make crap come up in another cell?Like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>Add some crap</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
//<![CDATA[<!--
function Add(obj) {
obj.parentNode.nextSibling.appendChild(document.createTextNode("SOME CRAP"));
}
//-->//]]>
</script>
</head>
<body>
<table border="1" cellpadding="0" cellspacing="0" summary="">
<tr><td><img onclick="Add(this);" alt="myimage" src=http://www.webdeveloper.com/forum/archive/index.php/"MyImage.gif" height="25" width="50" /></td><td></td></tr>
</table>
</body>
</html>I know a little about javascript. But i don't really know what that script is doingHopefully what you wanted.
Click on an image in one cell and text is written to the next cell in the row.
 
Back
Top