A new variation on a clbuttic mistake



  • I found a live one:


    http://samples.gotdotnet.com/quickstart/howto/doc/Xml/XmlNameSpace.aspx

    Go to that page and look at the second code snippet. Press the "VB" and "C#" buttons to convert between the two. Notice the "http://" in the namespace URIs. The VB version lists them as "http:'", probably because of a global search and replace on comments.

    Here's hoping the forum software doesn't eat/mangle this post too much...



  •  I see no "VB" or "C++" buttons



  • @GettinSadda said:

     I see no "VB" or "C++" buttons

     

    Same here. I gave up on this.



  • Alright, that's odd. What browser are you using? Two buttons appear below each code snippet in the main content column of that page. They don't really look like buttons, but they are labeled "C#" and "VB" respectively. Each are grey, but one is lighter than the other. They appear just fine for me, using IE 6 (I don't have any other browsers to look at it at work, so I can't tell you about any other browsers).



  • Firefox 3b3

    When I use IE Tab the buttons are there.



  • In that case we have the extra WTF of nonexistent cross-browser support.



  • @Welbog said:

    In that case we have the extra WTF of nonexistent cross-browser support.
     

    Right, because I am sure there are z0rr0 b00g5 in Firefox.



  • The function responsible for the buttons:

        function doClick(index, numTabs, id) {
    document.all("tab" + id, index).className = "tab";
    for (var i=1; i < numTabs; i++) {
    document.all("tab" + id, (index + i) % numTabs).className = "backtab";
    }
    document.all("code" + id, index).style.display = "";
    for (var j=1; j < numTabs; j++) {
    document.all("code" + id, (index + j) % numTabs).style.display = "none";
    }
    }

    Not supporting document.all isn't a bug. But then again this is asp.net so it might remove the buttons server-side.



  • @MasterPlanSoftware said:

    @GettinSadda said:

     I see no "VB" or "C++" buttons

     

    Same here. I gave up on this.


    I'm using FF, and I don't see the buttons either - but noticed the snippet displayed is the vb one - complete with 3 lines similar to the following:

    nsmanager.AddNamespace("myns", "http:'tempuri.org/myUSorderprocessornamespace")

     Oddly enough, though, in the block of 4 similar lines there are 3 wrong and 1 correct.  Written after the find-replace, maybe?



  • @Welbog said:

    Not supporting document.all isn't a bug. But then again this is asp.net so it might remove the buttons server-side.

    Indeed, having Opera mask as IE makes the buttons appear. They don't work though, so that's probably another WTF. The original WTF in the VB code is still visible anyway.



  • @Welbog said:

    The function responsible for the buttons:

        function doClick(index, numTabs, id) {
            document.all("tab" + id, index).className = "tab";
            for (var i=1; i < numTabs; i++) {
                document.all("tab" + id, (index + i) % numTabs).className = "backtab";
            }
            document.all("code" + id, index).style.display = "";
            for (var j=1; j < numTabs; j++) {
              document.all("code" + id, (index + j) % numTabs).style.display = "none";
            }
        }


    Not supporting document.all isn't a bug. But then again this is asp.net so it might remove the buttons server-side.

     

    Firefox has a nice implementation of document.all - it tells scripts checking for it that it does not exist, but functions when it is simply used w/o checking.



  •  



  • Yep, same with User Agent Switcher on Firefox



  • @Welbog said:

    In that case we have the extra WTF of nonexistent cross-browser support.

    To be fair, GotDotNet is a very old site, no longer maintained, and apparently is being phased out. 


Log in to reply