This is a migrated thread and some comments may be shown as answers.

[Solved] Tabs displayed, Content is not, in Debug, freezes Visual Studio

1 Answer 140 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jessie
Top achievements
Rank 1
jessie asked on 28 May 2011, 04:12 AM
Dont think browser related because it works fine when deployed just not in debug mode running from Visual Studio 2010. It seems to freeze Visual Studio until I stop the web server running the debug session.

Code:

<script type="text/javascript">
    function dropDown_onchange(e) {
        var tabName = '';
        var dropDown = $(e.data);

        switch (e.data) {
            case "#DeliveryEmailList":
                tabName = '.cs-adlogix-email';
                break;
            case "#DeliveryTextList":
                tabName = '.cs-adlogix-text';
                break;
            case "#DeliveryTwitterList":
                tabName = '.cs-adlogix-twitter';
                break;
            case "#DeliveryFacebookList":
                tabName = '.cs-adlogix-fb';
                break;
        }

        var tabstrip = $("#DeliveryMethods").data("tTabStrip");
        var item = $("li." + tabName, tabstrip.element);

        if (dropDown.val() != 'None') {
            tabstrip.enable(item);
        } else {
            tabstrip.disable(item);
        }

    }
                       
    function add_ArtifactDocument_ready() {

        $('#IsDailyDeal').bind('click', null, chasingSavings.Artifact.showDailyDealDelivery);
        $('#frmAddArtifact').bind('submit', { isAdding: true, hasPayload: true }, chasingSavings.Artifact.validate);
        $('#CSArtifactTypeField').bind('change', null, chasingSavings.Artifact.GetArtifactSizeDetails);
        $('#DeliveryEmailList').bind('change', '#DeliveryEmailList', dropDown_onchange);
        $('#DeliveryFacebookList').bind('change', '#DeliveryFacebookList', dropDown_onchange);
        $('#DeliveryTextList').bind('change', '#DeliveryTextList', dropDown_onchange);
        $('#DeliveryTwitterList').bind('change', '#DeliveryTwitterList', dropDown_onchange);

        $('#IsDailyDeal').click();
        $('#IsDailyDeal').click();
        chasingSavings.Artifact.showDailyDealDelivery();
       
       
    }

</script>

 

                    <td colspan="6">
                         <%=Html.Telerik().TabStrip().Name("DeliveryMethods")
                                                     .Items(item => item
                                                                             .Add()
                                                                             .Text("General")
                                                                              .HtmlAttributes(new {@class = "cs-adlogix-general"})
                                                                             .Enabled(true)
                                                                             .LoadContentFrom("GeneralInfo", "Artifact"))  
                                                     .Items(item => item
                                                              .Add()
                                                              .Text("Facebook")
                                                              .Enabled(false)
                                                              .LoadContentFrom("DeliveryMethodFacebook", "Artifact")
                                                              .HtmlAttributes(new { @class = "cs-adlogix-fb" }))
                                                                                                                       
                                                     .Items(item => item
                                                                      .Add()
                                                                      .Text("Twitter")
                                                                      .Enabled(false)
                                                                      .HtmlAttributes(new { @class = "cs-adlogix-twitter" })
                                                                       .LoadContentFrom("DeliveryMethodTwitter", "Artifact"))
                                                     .Items(item => item
                                                                       .Add()
                                                                       .Text("Text Message")
                                                                       .Enabled(false)
                                                                       .HtmlAttributes(new { @class = "cs-adlogix-text" })
                                                                       .LoadContentFrom("DeliveryMethodText", "Artifact"))
                                                     .Items(item => item
                                                                        .Add()
                                                                        .Text("Email Blast")
                                                                        .Enabled(true)
                                                                        .HtmlAttributes(new { @class = "cs-adlogix-email" })
                                                                                      .LoadContentFrom("DeliveryMethodEmail", "Artifact")
                                                                                      .Selected(true))
                                                                              
                                                     .HtmlAttributes(new { style = "width:900px;" })
                                                     
                        %>

                    </td>

1 Answer, 1 is accepted

Sort by
0
nachid
Top achievements
Rank 1
answered on 28 May 2011, 07:34 AM
A quick idea...
What's the need to have all your tabs dynamic (LoadContentFrom)?
Put a least one of them static (Content), the first one for example.
Tags
TabStrip
Asked by
jessie
Top achievements
Rank 1
Answers by
nachid
Top achievements
Rank 1
Share this question
or