PDA

View Full Version : How do you add a target to an onclick?


AshleyQuick
07-26-2003, 09:21 PM
<script>
useDhtml=((document.all) || (document.layers))?true:false;
function ShowColor(tr, color){if(useDhtml){tr.bgColor=color;}}
</script>

<table>
<tr>
<td onmouseover="ShowColor(this,'#6666FF'); this.style.cursor='hand';" onmouseout="ShowColor(this,'#3333FF');" onClick="window.location.href='main.html'" height="35">Link One</td>
</tr>
</table>

..because I'm using frames, I need to have this point to a target. How is this done inside a td?

Ash

Arctic Fox
07-26-2003, 09:48 PM
Something like this:


onClick="javascript:window.open('SomePage.html','TargetName');"

cheesebagpipe
07-26-2003, 09:50 PM
onClick="frames.frame_name.location='main.html'"

AshleyQuick
07-27-2003, 03:48 AM
The first suggestion worked, thanks!

Ash