Closed ConquerDeveloper closed 8 years ago
@ConquerDeveloper You need to use the setData()
method inside of the onSubmit()
callback in order to get the current value at the time the upload is submitted:
onSubmit: function () {
this.setData({ title: document.getElementById("title").value });
$("#upload").button("loading");
},
If you just use the data
option like you're currently doing, it's getting the value of the title input field at the time the uploader is initialized when the page loads, before the user ever enters anything.
Let me know if it works.
@LPology Thank you so much!!! It worked!!
Excellent, glad I could help.
Hello, first of all, thank you so much for developing simple ajax uploader.
The plugin works just fine for me, the only issue i have is that i'm trying to upload an input text field value and i'm sending it to the server but it doesn't work. It only works when i give it a default value. For example:
data: {title: "hello world"}
but doesn't work like this:
data: {title: document.getElementById('title').value}
How can i solve this? Thank you so much for your help!!!
Here's my complete code: