Click to See Complete Forum and Search --> : not triggered by a link
jazzyjade
03-10-2004, 10:27 AM
Is there any way to code this? (Everything I come up with seems way too complicated for the task and leads me in circles.)
If (this function was not triggered by clicking a link) {
do this
}
Thanks!
someone will probably say this is only IE applicable but what the hell, it gives you a start
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<SCRIPT>
function doIt(){
if(event.srcElement.tagName!="A"){
alert("Hmm, this was not triggered by link!")
}
}
</SCRIPT>
<a href="#" onclick="doIt(); return false;">Click Here</a>
<P>
<input type=button onclick="doIt()" value="Click Me">
</BODY>
</HTML>
cheers