Woodman
02-22-2003, 02:48 AM
I have a problem with the onclick function, being a complete newbie at this, im not sure about the specifics.
Here's the problem:
<span id="signature"><br><br><br><a href="JavaScript:copyTo(document.all.signature)">Lala</a></span>
This seems simple enough, except that I want to activate this function when clicking a table, so:
<td bgcolor=#292422 onMouseOver="this.style.backgroundColor='#6F615D'; this.style.cursor='hand'" onMouseOut="this.style.backgroundColor=''" onClick="JavaScript:copyTo(document.all.signature)'"><span>Lala</span></td>
Unfortunatly it doesn't work, & i know the reason why :) . My question is whats the exact command I should use to activate the copyTo function through "onclick"?
Maybe something like "run.copyTo=('document.all.signature')" (doesnt work though)?
If i make the onclick function goto a link, i obviously cant do this:
onClick="lala.html'"
It should be this:
onClick="window.location.href=('lala.html')"
So what should it be when running a function i made?
Any help greatly appreciated, thanks :)
Here's the problem:
<span id="signature"><br><br><br><a href="JavaScript:copyTo(document.all.signature)">Lala</a></span>
This seems simple enough, except that I want to activate this function when clicking a table, so:
<td bgcolor=#292422 onMouseOver="this.style.backgroundColor='#6F615D'; this.style.cursor='hand'" onMouseOut="this.style.backgroundColor=''" onClick="JavaScript:copyTo(document.all.signature)'"><span>Lala</span></td>
Unfortunatly it doesn't work, & i know the reason why :) . My question is whats the exact command I should use to activate the copyTo function through "onclick"?
Maybe something like "run.copyTo=('document.all.signature')" (doesnt work though)?
If i make the onclick function goto a link, i obviously cant do this:
onClick="lala.html'"
It should be this:
onClick="window.location.href=('lala.html')"
So what should it be when running a function i made?
Any help greatly appreciated, thanks :)