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

script error when using MVC helpers/plugins for image browser

1 Answer 49 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Glavin
Top achievements
Rank 1
Glavin asked on 20 Feb 2013, 07:43 PM
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"))
  )

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 22 Feb 2013, 03:40 PM
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!
Tags
Editor
Asked by
Glavin
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or