Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Thanked 1 Time in 1 Post

    failing to retrieve target in FF

    hi - this fails in FF when trying to get back the event target. why?
    function getindex(a,b){for(var i=0;i<b.length;i++)if(b[i]==a)return i;return false;}
    function el(a){
    switch(typeof a){
    case 'object' : case 'undefined' : return (window.event) ? event.srcElement : a.target;
    case 'string' : return document.getElementById(a);
    case 'number' : var b = document.getElementsByTagName('*'); return b[Math.max(0,Math.min(b.length-1,getindex(el(),b)+a))];
    the bit in red is the trouble spot.
    Last edited by subhailc; 12-17-2005 at 12:48 PM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts