Hi again!
I'm trying to figure out how to check which link the user has clicked on.
Goes like this:
<html>
<script>
function trapper() {
var collAElements = document.body.getElementsByTagName("A"
for (i=0;i<collAElements.length;i++) {
//trying to find which one the user has clicked???
}
</script>
<body>
<form>
<input type=text name=xxx value=yyy>
<a href="" onclick=javascript:trapper();>Change value in xxx</a>
<input type=text name=zzz value=yyy>
<a href="" onclick=javascript:trapper();>Change value in zzzz/a>
etc
..
..
..
</form>
</body>
</html>
What I'm actually trying to do here is determine which of this links the user has clicked without knowing any values or names on the form.
Cheers
DoTheLoop
I'm trying to figure out how to check which link the user has clicked on.
Goes like this:
<html>
<script>
function trapper() {
var collAElements = document.body.getElementsByTagName("A"
for (i=0;i<collAElements.length;i++) {
//trying to find which one the user has clicked???
}
</script>
<body>
<form>
<input type=text name=xxx value=yyy>
<a href="" onclick=javascript:trapper();>Change value in xxx</a>
<input type=text name=zzz value=yyy>
<a href="" onclick=javascript:trapper();>Change value in zzzz/a>
etc
..
..
..
</form>
</body>
</html>
What I'm actually trying to do here is determine which of this links the user has clicked without knowing any values or names on the form.
Cheers
DoTheLoop