Loading fails

3 posts, 0 answers
  1. Greg
    Greg avatar
    19 posts
    Member since:
    May 2012

    Posted 06 Jun 2013 Link to this post

    I have partial views under 7 tabs. first 1-2 tabs loads the content but after that it throws "loading failded" error. Please help.

    Here is my code:

    @(Html.Kendo().TabStrip()
    .Name("tabstrip")
    .Events(events => events
    //.Select("onSelect")
    //.Activate("onActivate")
    .ContentLoad("onContentLoad")
    .Error("onError")
    )

    .Items(tabstrip =>
    {
    tabstrip.Add().Text("Specifics")
    .Selected(true)
    .LoadContentFrom("SelectSpecifics", "Citation", new { id = @Model.CitationID, docType = @Model.DocType });

    tabstrip.Add().Text("Authors")
    .LoadContentFrom("Authors", "CitationAuthors", new { id = @Model.CitationID });

    tabstrip.Add().Text("Abstract")
    .LoadContentFrom("Abstract", "CitationAbstract", new { id = @Model.CitationID });

    tabstrip.Add().Text("Notes")
    .LoadContentFrom("Notes", "CitationNotes", new { id = @Model.CitationID });


    tabstrip.Add().Text("Descriptors")
    .LoadContentFrom("Descriptors", "CitationDescriptors", new { id = @Model.CitationID });


    tabstrip.Add().Text("Groups")
    .LoadContentFrom("Groups", "CitationGroups", new { id = @Model.CitationID });

    tabstrip.Add().Text("DeletionHistory")
    .LoadContentFrom("DeletionHistory", "CitationHistory", new { id = @Model.CitationID });

    tabstrip.Add().Text("RetrievalHistory")
    .LoadContentFrom("RetrievalHistory", "CitationHistory", new { id = @Model.CitationID });

    tabstrip.Add().Text("Accession No.")
    .LoadContentFrom("AccessionNumber", "CitationHistory", new { id = @Model.CitationID });


    tabstrip.Add().Text("CopyRequest")
    .LoadContentFrom("CopyRequest", "CopyRequest", new { id = @Model.CitationID });


    tabstrip.Add().Text("Events")
    .LoadContentFrom("Events", "CitationEvents", new { id = @Model.CitationID });

    tabstrip.Add().Text("ClearingHouse")
    .LoadContentFrom("ClearingHouse", "CitationClearingHouse", new { id = @Model.CitationID });
    })
    )

    </div>

    <p>
    <input type="submit" id="btnSubmit" value="Submit" name="submit" />
    <input type="submit" id="btnCancel" value="Cancel" name="cancel" />

    </p>
    }

    <script>
    function onSelect(e) {
    //kendoConsole.log("Selected: " + $(e.item).find("> .k-link").text());
    alert("Activate fired");

    }

    function onActivate(e) {
    //kendoConsole.log("Activated: " + $(e.item).find("> .k-link").text());
    alert("Activate fired");

    }

    function onContentLoad(e) {
    //kendoConsole.log("Content loaded in <b>"+ $(e.item).find("> .k-link").text() + "</b> and starts with <b>" + $(e.contentElement).text().substr(0, 20) + "...</b>");
    //alert("Activate fired");


    }

    function onError(e) {
    //kendoConsole.error("Loading failed with " + e.xhr.statusText + " " + e.xhr.status);
    alert("error fired");
    }
     
    Thanks
    Vandana
  2. Greg
    Greg avatar
    19 posts
    Member since:
    May 2012

    Posted 07 Jun 2013 Link to this post

    Can someone answer this post please? I am stuck with this issue.

    Thanks
    V
  3. Kendo UI is VS 2017 Ready
  4. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 10 Jun 2013 Link to this post

    Hello Greg,

    We see not reason why the loading should fail, basically if two tabs load without issues rest should load fine too.

    Make sure that the content of these two tabs do not load the jQuery library multiple times - this would cause the TabStrip to stop working. 

    If the problem exist even when the content is just simple strings, we will need a sample project which demonstrates the case.

    Kind Regards,
    Petur Subev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top