37 users online (1 members and 36 guests)  


  Results 1 to 1 of 1

Related

  1. hyperlink in table cell not working    Forum: HTML Forum
    Replies: 1
  2. Not working in IE    Forum: HTML Forum
    Replies: 2
  3. onFocus to close a window    Forum: Javascript Forum
    Replies: 1
  4. Why isn't this working?    Forum: HTML Forum
    Replies: 5
  5. Replies: 5
  1. #1
    KarniRevuri's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    1

    Onfocus for table id is not working

    Hi Friends,

    I have tried to onfocus for table but it is workiing in IE but not FIREFOX

    Please see below code

    Code:
    if (document.addEventListener) 
          {     
            window.onload = function (evt) 
             {
                setTimeout("document.getElementById('table_id').focus()",0);
                        
              }                 
          }
          else
          {   
            
             /* for IE 6 and IE 7 */         
            //setTimeout( fieldFocus , 100 );
            window.onload = function (evt) 
            {   
                setTimeout(fieldFocus , 100 );
            }
         /* TO DO : Still to check in all other browsers */      
          }    
        function fieldFocus()
        {
            document.getElementById('table_id').focus();
        }

    But If I change the onfocus from table to textbox it is working fine in both browsers
    Please give me if u have any ideas why onfocus is not working in firefox for table
    Last edited by vinyl-junkie; 10-30-2007 at 07:09 AM. Reason: Added code tags



Tags for this Thread