script error when using MVC helpers/plugins for image browser

2 posts, 0 answers
  1. Glavin
    Glavin avatar
    11 posts
    Member since:
    Nov 2008

    Posted 20 Feb 2013 Link to this post

    When I try and use the mvc html helpers I get javascript errors when I try and use the image browser. When I use the jquery version, everything works just fine.

    One of the errors occurs when you open the image browser, then try and close it. Firefox gives a "TypeError: e is null"


    version 2012.3.1315

    here is the important part of the razor file:
    @(Html.Kendo().EditorFor(m => m.Body)     
        .Encode(false)
        .HtmlAttributes(new { style = "width: 740px;height:440px" })
        .Tools(tools => tools.Clear().InsertImage())
          .ImageBrowser(imageBrowser => imageBrowser
          .Image("~/Content/Images/{0}")
          .Read("Read", "ImageBrowser")
          .Create("Create", "ImageBrowser")
          .Destroy("Destroy", "ImageBrowser")
          .Upload("Upload", "ImageBrowser")
          .Thumbnail("Thumbnail", "ImageBrowser"))
      )
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 22 Feb 2013 Link to this post

    Hello Michael,

    Does the problem exist with the MVC offline demos? Did you add all the needed scripts?

    I tried your snippet on my side and everything is working fine. Feel free to share e project so we can take a look what goes wrong.

    Kind regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top