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

Upload Error: "Microsoft JScript runtime error: Object doesn't support property or method 'kendoUpload'"

2 Answers 271 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Tyler
Top achievements
Rank 1
Tyler asked on 13 Aug 2012, 08:57 PM
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="/Cmrs Web/Content/kendo.common.min.css">
    <link rel="stylesheet" href="/Cmrs Web/Content/kendo.default.min.css">
    <script src="/Cmrs Web/Scripts/jquery.min.js"></script>
    <script src="/Cmrs Web/Scripts/kendo.web.min.js"></script>
    <script src="/Cmrs Web/Scripts/kendo.aspnetmvc.min.js"></script>
     
    <title>Upload ARF/ASR File(s)</title>
 
    <link href="/Cmrs%20Web/Content/kendo" rel="stylesheet" type="text/css" />
 
    <script src="/Cmrs%20Web/Scripts/jquery-1.6.2.js" type="text/javascript"></script>
<script src="/Cmrs%20Web/Scripts/jquery-1.7.2.js" type="text/javascript"></script>
 
    <script src="/Cmrs%20Web/bundles/kendo" type="text/javascript"></script>
 
</head>
<body>
</body>
</html>
 
<div class="configuration k-widget k-header" style="width: 300px">
    <span class="infoHead">Information</span>
    <p>
        The Upload is able to upload files out-of-band using the
        HTML5 File API with fallback for legacy browsers.
    </p>
    <p>
        You need to configure save action that will receive
        the uploaded files.
        An optional remove action is also available.
    </p>
</div>
 
<div style="width:45%">
    <input id="files" name="files" type="file" /><script>
    jQuery(function(){jQuery("#files").kendoUpload({async:{saveUrl:"/Cmrs Web/Upload/Submit",removeUrl:"/Cmrs Web/Upload/Remove",autoUpload:true}});});
</script>
</div>
</form>


Above is the code that I am using to attempt to create the Kendo Upload control.  I receive the error "Object doesn't support property or method 'kendoUpload' and points to the line: 
jQuery(function(){jQuery("#files").kendoUpload({async:{saveUrl:"/Cmrs Web/Upload/Submit",removeUrl:"/Cmrs Web/Upload/Remove",autoUpload:true}});});


This line is show in the [dynamic] view of the code at runtime.

I am given the option to Break, Continue, or Ignore.  If I continue or Ignore, the control still appears on the screen, but if I attempt to upload a file, the following method in my Controller class does not recognize that a file was uploaded:

public ActionResult Submit(IEnumerable<HttpPostedFileBase> files)
        {
 
            SimpleDeviceBusiness simpleDeviceBusiness = new SimpleDeviceBusiness();
            string message;
            string xmlToSend = "";
            string extension;
            int count = 0;
            foreach (var file in files)
            {

The "files" parameter shows null even though a file has been selected.

Please help!

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 14 Aug 2012, 07:02 AM
Hello,

 You have included jQuery twice. Include it only once.

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tyler
Top achievements
Rank 1
answered on 14 Aug 2012, 06:20 PM
Thanks Atanas, that resolved it.  Not sure how I overlooked that, I'm calling the jquery and kendo bundles which were in turn running two different jquery scripts and causing the conflict.
Tags
Upload
Asked by
Tyler
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Tyler
Top achievements
Rank 1
Share this question
or