I'm trying to use dropzone.js.
This works:
<form id='imageForm' action="<?php print $website["folder"]; ?>upload.php" class="dropzone" data-maxFiles='1'>
</form>
This does not work:
<form id='imageForm'>
</form>
<script>
$("#imageForm").dropzone({ url: websiteFolder + "upload.php" });
</script>
Nor going with:
<script>
Dropzone.options.imageForm = {
paramName: "file", // The name that will be used to transfer the file
maxFilesize: 2, // MB
accept: function(file, done) {
if (file.name == "justinbieber.jpg") {
done("Naha, you don't.");
}
else { done(); }
}
};
</script>
In both latter cases, I get no errors, and no dropzone is created.
I'd think I'm overlooking something obvious. But, what is it?