ljharper62
11-24-2005, 03:48 PM
I'm working on a web catalog, using a getElementByID to change the product image and description with the onClick event. I would like to also set an anchor to my image location with the onClick event so that the page automatically jumps to where the image and description appear. I currently have the code of:
<tr>
<td bordercolor="#c7ebff" width="78" bgcolor="#ffffff" height="74"><p
align="center">n.08</p></td>
<td width="97" bgcolor="#ffffff" height="74"><p align="center" onclick="document.getElementById('addThumb').innerHTML = '<a name=\'addThumb\'/></a>'; document.getElementById('addThumb').innerHTML = '<img src=\'s_garden.jpg\'/>'; document.getElementById('addDesc').innerHTML = '<p>Close in fighting skills are developed by the routine - using elbows, fingers and hook hands. This is the predecessor to Wing Chun style. Develops the ligaments.</p>';">Crane</p></td>
<td bordercolor="#c7ebff" align="middle" width="146" bgcolor="#ffffff" height="74"><div align="center">$29.95</div></td>
</tr>
The image and description show up as they should but the page does not go to the anchored site. Any ideas? :confused: :confused:
<tr>
<td bordercolor="#c7ebff" width="78" bgcolor="#ffffff" height="74"><p
align="center">n.08</p></td>
<td width="97" bgcolor="#ffffff" height="74"><p align="center" onclick="document.getElementById('addThumb').innerHTML = '<a name=\'addThumb\'/></a>'; document.getElementById('addThumb').innerHTML = '<img src=\'s_garden.jpg\'/>'; document.getElementById('addDesc').innerHTML = '<p>Close in fighting skills are developed by the routine - using elbows, fingers and hook hands. This is the predecessor to Wing Chun style. Develops the ligaments.</p>';">Crane</p></td>
<td bordercolor="#c7ebff" align="middle" width="146" bgcolor="#ffffff" height="74"><div align="center">$29.95</div></td>
</tr>
The image and description show up as they should but the page does not go to the anchored site. Any ideas? :confused: :confused: