Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
110
rated 0 times [  114] [ 4]  / answers: 1 / hits: 16774  / 11 Years ago, wed, april 24, 2013, 12:00:00

How can I use dropzone without using the class in the form.



I basically want to have a div inside a form and call class=dropzone in that div. But it doesn't seems to work.



Here is my code below:



<!DOCTYPE html>
<html lang=en>
<head>
<title></title>
<link rel=stylesheet href=css/basic.css />
<link rel=stylesheet href=css/dropzone.css/>
<script src=dropzone.min.js></script>
<script type=text/javascript>
var myDropzone = new Dropzone(div#myId, { url: file-upload})
</script>

<body>
<form action=upload.php>
<input type=text>
<div id=myId class=dropzone></div>
</form>
</body>
</html>

More From » jquery

 Answers
12

your url parameter is not pointing to any valid php file. I believe your code should be thus



<!DOCTYPE html>
<html lang=en>
<head>
<title></title>
<link rel=stylesheet href=css/basic.css />
<link rel=stylesheet href=css/dropzone.css/>
<script src=dropzone.min.js></script>
<script type=text/javascript>
var myDropzone = new Dropzone(div#myId, { url: upload.php}) //according to your forms action
</script>

<body>
<form action=upload.php>
<input type=text>
<div id=myId class=dropzone></div>
</form>
</body>



[#78661] Tuesday, April 23, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
daja

Total Points: 407
Total Questions: 103
Total Answers: 103

Location: Ghana
Member since Sun, Mar 27, 2022
2 Years ago
daja questions
Tue, Dec 21, 21, 00:00, 2 Years ago
Thu, Apr 23, 20, 00:00, 4 Years ago
Fri, Sep 6, 19, 00:00, 5 Years ago
Tue, Jul 23, 19, 00:00, 5 Years ago
;