Microsoft.com and Opera Conflic... Evil scheme? - Page 2
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Microsoft.com and Opera Conflic... Evil scheme?

  1. #11
    Senior Member
    Join Date
    Oct 2001
    Posts
    101

    Microsoft web programmers need to read a book

    Someone at microsoft doesn't know how to write code...

    function findDIV(x)
    {
    var oDiv = document.all.tags("DIV");
    var iDiv;
    if (oDiv != null)
    {
    iDiv = oDiv.length;
    for (var i=0; i<iDiv; i++)
    {
    if(oDiv[i].contains(x))
    {
    return oDiv[i];
    }
    }
    }
    }
    Can anyone tell me what's wrong with this FUNCTION? (Remember, functions are supposed to return something. What happens if oDiv[i].contains(x) = false?). See, this is why I like compilers because you catch these errors. The error I get is 'function does not always return a value'. So I am assuming it is NOT returning a value in my case.

    This specifically caused problems with my browser (Netscape 4.03). It basically was maxing out my cpu and crashing netscape.

    The way I see it is that their fancy menu bar calls this function but since my netscape doesn't support divs (i'm assuming, not quite sure though), either oDiv[i].contains(x) returns false OR oDiv = null (obviously otherwise this function would've returned something).

    Not sure if this is on topic or not but I hate sloppy code, it's one of my pet peeves.
    Share on Google+

  2. #12
    Senior Member
    Join Date
    Oct 2001
    Posts
    101

    Lightbulb oh yeah

    Here's a copy of the js file that I found this code in.
    Share on Google+

  3. #13
    Old-Fogey:Addicts founder Terr's Avatar
    Join Date
    Aug 2001
    Location
    Seattle, WA
    Posts
    2,007
    I think this is seperate from the MSN.com problems and the previous news, since it seems to be a scripting issue rather than a header issue, and it wasn't with MSN itself... Actually, I'll try firing up the Proxomitron and seeing if I can isolate it to either a header or a page problem.
    [HvC]Terr: L33T Technical Proficiency
    Share on Google+

  4. #14
    Senior Member
    Join Date
    Oct 2001
    Posts
    101
    Originally posted by Terr
    ..it seems to be a scripting issue rather than a header issue...
    Remember that I (personally anyways) am using an older browser that doesn't support the newer javascripts, and microsoft is well known for not doing reverse compatibility. So it still might be a header problem, I guess you'll be finding that out soon enough.

    Also I thought this was a microsoft.com issue, not msn.com?
    Share on Google+

Posting Permissions

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

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides