views:

19

answers:

1
+1  Q: 

AJAX.Upload Plugin

I am using the Ajax.Upload plugin (http://valums.com/ajax-upload/).

I am trying to use the File Upload with text fields to submit it all to just one backend PHP file. The site mentions 'If you want to pass additional data from textfields use setData method in a onSubmit callback.'

How can I set the parameters? Thanks.

Also, if there are other such plugins which might be of use.

+1  A: 

You can set it like this: upload.setData({'my_value_name': document.getElementById('my_textarea_id').value});

Just change my_value_name the name of the element and set an id on your text field so you can access it with my_textarea_id.

King Asoka