Hi all,
I have small problem.
I've been playing with swfupload for 3-4 days and i can't figure it out how can upload queued images when I press submit button and upload it with the rest of my form?
I have 2 textarea fields and swfupload field ad my submit button.
How can I submit all this data with my submit button.
hope you'll understand
pozz
re:
I looked basic example of that You provide with package, it's pretty straightforward but Can I implement MULTIPLE SELECTION of files, so i can select 10 files at once and then fill out form and send it?
thanks
multiple selection solved but still problems
i'm modifying formsdemo demo which is in original package.
How can display selected files like in others demos?
I know that function fileQueued is key but I can't figure it out.
please help me
Couple of things
Selecting multiple files is accomplished by calling selectFiles instead of selectFile
Sending form fields can be tricky. You have to decide what you are going to do if the user changes what is in the fields after the batch upload has already begun. Say the change a textbox after 5 of 10 files have been uploaded. What value are you going to send with the remain 5 uploads?
Anyways,
In the function that begins your upload (if your button is calling swfu.startUpload() you need to change that to a function).
// Pseudo code
function StartMyUpload() {
var value1 = getFormValue("myTextbox");
var value2 = getFormValue("myOtherTextbox");
swfu.setPostParams({
"valueToSend1" : value1,
"valueToSend2" : value2
});
swfu.startUpload();
}
You'll have to work out how to get your form values (it depends on whether you are using straight JavaScript or some library like Prototype or jQuery). Then you set SWFUpload's Post Params object. Remeber that setting it overwrites anything what was there previously so be careful that you don't lose anything that you set in your SWFUpload settings.
Then the 1st upload will start. Since this is only called when clicking the "start upload" button the form fields are only read that one time and will be the same for all the uploads.
help again
I found demo where is all I need bud with one difference.
The demo is for uploading only one file (I changed selectFile to selectFiles and now I can select upload multiple files), I can't figure how can display queued file below browse button?
demo is in original download package with the name "formsdemo"
I'm new in javascript all I do with jquery is copy/paste parts of various script that I need, this is complicated to me so if you can help me I would be very grateful.
pozz
re
uređivanje
Naziv:
Obriši sliku
$j(document).ready(function(){
$j("#brisi_").click(function (e) {
e.preventDefault();
confirm("Da li želite obrisati sliku?", function () {
$j.ajax({
type: "GET",
url: "",
data: "",
success: function(data) {
$j("#slika_").hide();
$j("a.linkcrveno").hide();
}
});
});
});
function confirm(message, callback) {
$j("#confirm").modal({
close:false,
overlayId:'confirmModalOverlay',
containerId:'confirmModalContainer',
onShow: function (dialog) {
dialog.data.find('.message').append(message);
// if the user clicks "yes"
dialog.data.find('.yes').click(function () {
// call the callback
if ($j.isFunction(callback)) {
callback.apply();
}
// close the dialog
$j.modal.close();
});
}
});
}
});
<?php
}
Obriši sliku
$j(document).ready(function(){
$j("#obrisi_").click(function (e) {
e.preventDefault();
confirm("Da li želite obrisati sliku?", function () {
$j.ajax({
type: "GET",
url: "",
data: "",
success: function(data) {
$j("#slike_").hide();
$j("#obrisi_").hide();
}
});
});
});
function confirm(message, callback) {
$j("#confirm").modal({
close:false,
overlayId:'confirmModalOverlay',
containerId:'confirmModalContainer',
onShow: function (dialog) {
dialog.data.find('.message').append(message);
// if the user clicks "yes"
dialog.data.find('.yes').click(function () {
// call the callback
if ($j.isFunction(callback)) {
callback.apply();
}
// close the dialog
$j.modal.close();
});
}
});
}
});
<?php
}
}
?>
Potvrdi brisanje
NeDa
Kratka vijest:
32135481
Sadržaj:
3213857687688451
Single file upload
Multiple file upload
As you can see there is 2 file fields and the rest of the form.
Can anyone who knows how to make upload entire form with ALL files and data pleas explain me so I can learn and do it later myself.
@gyphie I read your post and i don't understand how to make this work,
I send this piece of code(this is entire form) so you can see what I'm trying to accomplish. Please help me if you have little time
thanks in advance
if you want i'll send you html file with source so you can see what can you do