CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Jul 2003
    Location
    Pakistan
    Posts
    11

    Unhappy style.color does not work in firefox

    Hi all,

    The following code runs fine on internet explorer but not in firefox.
    I figured out that elm[i].style.color is not working, there's no error
    displayed either. Will anybody help me find the correct code for firefox?

    Thanks a lot.

    Code:
        var elm = document.getElementsByTagName("a");
        //alert(elm.length);
        
        for(var i=0;i<elm.length;i++)
        {
            if(elm[i].style.color=="saddlebrown")
                alert(elm[i].style.color);
                
        }
    Last edited by PeejAvery; January 29th, 2008 at 07:46 AM.
    baburman

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured