what link was clicked a div.
now before you read this if anyone know a site on javascript that is past showing you how to use a loop or if statement please post the link.
I've read some books but they never really help you understand javascript
I would like to know how to connect objects to functions or use settime out with event handelers or something. I feel like I can't seem to get much better at javascript.
by the way I like was was done to the site by the way. The buttons are much better anyway
I'm trying to loop through all the links in a a Div and then find out what one was clicked. if it was link one I wanted to call an alert with the if statement. this is just to see if it works
also if you can call more that one link using switch how is it set up. I've tried using it and it doesn't work but if else doesn't work. I think i'm just a bad coder
function filink(e){
var targ;
if (!e) var e = window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
return false;
}
if (!document.getElementsByTagName) return false;
var Mlinks = document.getElementById('navebase').getElementsByTagName("a");
for (var ty=0; ty < Mlinks.length; ty ++) {
if (e==targ.Mlinks[0]){alert ("The function works")}}