Error Using Jquery tmpl plugin with jquery file upload plugin
in Using jQuery Plugins
•
5 months ago
Hello,
I have been trying to get the gui version of the file upload plugin to work in my app. I can get the non-gui version to work fine, however whenever I include the required jquery tmpl library, along with the fileupload gui files I get the following error:
newItem.tmpl is not a function
http://localhost:8080/constellation/scripts/jqueryPlugins/fileUpload/jquery.tmpl.js
Line 36
The includes in my html file are as follows:
<!-- <br><br> -->
<!-- <br><br> -->
<br><br>
<br><br>
<br>
<script src="../scripts/jqueryPlugins/fileUpload/jquery.fileupload.js" type="text/javascript"> </script> <script src="../scripts/jqueryPlugins/fileUpload/jquery.fileupload-ui.js" type="text/javascript"> </script> <script src="../scripts/jqueryPlugins/fileUpload/jquery.iframe-transport.js" type="text/javascript"> </script> <link rel="stylesheet" href="../jquery-ui-plugins/css/jquery.multiselect.css" type="text/css" media="screen" charset="utf-8" /> <link type="text/css" href="../css/constellation.css" rel="Stylesheet" /> <script src="../jquery-ui-plugins/jquery.multiselect.min.js" type="text/javascript"> </script> <!-- <script src="../scripts/jquery.form.js" type="text/javascript"> </script> --> <!-- <script src="../scripts/jquery.form-2.6.9.js" type="text/javascript"> </script> --> <script src="../scripts/common.js" type="text/javascript"> </script> <script src="../scripts/uploadMulti.js" type="text/javascript"> </script> <!-- We're adding these scripts here so they're available to JS debuggers. They are actually invoked by the corresponding HTML pages. --> <!-- <script src="../scripts/uploadMulti.js" type="text/javascript"> </script> --> <script src="../scripts/mgmt.js" type="text/javascript"> </script> <script src="../scripts/queries.js" type="text/javascript"> </script> <script src="../scripts/admin.js" type="text/javascript"> </script> <script src ="../scripts/header.js" type="text/javascript"> </script> </head> I am invoking the fileupload plugin in another javascript file as follows:
$("#uploadDiv").fileupload();
$("#uploadDiv").fileupload({
url: '/constellation/rest/upload',
sequentialUploads: true
});
$("#uploadDiv").bind('fileupoladadd', function (e, data) {
$.each(data.files, function (index, file) {
alert('Added file: ' + file.name);
});
});
Any help at all from anyone would be greatly appreciated. I have been racking my head for days about this.
Also, I only see this error after I select multiple files from the file upload widget (that results from), Once I select two files and click the open button in the file dialog, I get the above mentioned error.
I have also posted this question with the fileupload plugin site. I am using the file upload plugin from http://aquantum-demo.appspot.com/file-upload.
I am unsure if I am doing something wrong, or missing something.
1



