< switch - case > problem


       var userMenu;
        var userPage;

        switch (url_parameter.group) {
            case "SYSTEM ADMIN":
                userMenu = "xml/menu_system_admin.xml";
                userPage = "CommonSchedule.aspx?view=global";
                break;
            case "BANKING LEADER":
                userMenu = "xml/menu_banking_leader.xml";
                 userPage = "CommonSchedule.aspx?view=global";
                break;
            case "BANKING SUP":
                userMenu = "xml/menu_banking_sup.xml";
                userPage = "OrderQuery.aspx";
                break;
    
        }

        app_body.attachURL(userPage);
        app_menubar.loadXML(userMenu  + '?e=' + new Date().getTime());

var userMenu;
        var userPage;

        if (url_parameter.group == "SYSTEM ADMIN") {
            userMenu = "xml/menu_system_admin.xml";
            userPage = "CommonSchedule.aspx?view=global";
        };

        if (url_parameter.group == "BANKING LEADER") {
            userMenu = "xml/menu_banking_leader.xml";
            userPage = "CommonSchedule.aspx?view=global";
        };


        app_body.attachURL(userPage);
        app_menubar.loadXML(userMenu + '?e=' + new Date().getTime());

The above is sample coding for < switch - case >. This < switch - case > is to control the screen display in the project. The < switch - case > is not work. As a result, the project cannot display in many bowrse except IE 9. It only work on IE 9.

I want to ask < switch - case > can support all bowrse and have any different. The above code have any mistake.

Other than < switch - case > . I also try to use command < if > statement. I have same result. It only work in IE9 but not action in other bowrse.

But I have tried to use full name and link that not use < switch - case > or < if > statement. It is OK and action in all bowrses.

The following code is OK and work !


        app_body.attachURL("CommonSchedule.aspx?view=global");
        app_menubar.loadXML( "xml/menu_banking_leader.xml"  + '?e=' + new Date().getTime());

Thanks !