Here is a nice little way of being able to submit any form data you want with uploadify without having to specify all the inputs.
Step 1
First thing you need is the basic demo going.
Step 2
Create a new function that will act as our new upload function. And replace “#new_doc_upload” with the id of the form with all the input you wish the send to the upload script.
<script type="text/javascript">
function startUpload(id){
var queryString = '&' + $('#new_doc_upload').serialize();
$('#'+id).fileUploadSettings('scriptData',queryString);
$('#'+id).fileUploadStart();
}
</script>
Step 3
Replace your start upload link with a link to the new function we made in step 3. In this case we pass our function the our upload id ‘fileUpload’ (You will need to change this to your own).
eg.
<a href="javascript:startUpload('fileUpload')">Start Upload</a>
And hey presto you should now be able to access all your form items using GET in you specified upload script.
Add New Comment
Viewing 3 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks
(Trackback URL)