views:

115

answers:

1

So I'm using uploadify to upload multiple images to a folder. Along with each upload, I want to pass along a 'batch name' from a text box value.

When I hard code the batch_name (Fire) below, the database updates fine, but when I replace 'fire' with $('#batch_name').val() the value doesn't seem to pass.

javascript

<script type="text/javascript">
$(document).ready(function() {
    $("#uploadify").uploadify({
        'uploader'       : 'uploadify/uploadify.swf',
        'script'         : 'uploadify.php',
        'scriptData'     : {'session_id': '<?php echo session_id(); ?>', 'batch_name': 'Fire'},
        'cancelImg'      : 'cancel.png',
        'queueID'        : 'fileQueue',
        'auto'           : false,
        'multi'          : true
    });
});
</script>

textbox

<input type="text" name="batch_name" id="batch_name"/>
+1  A: 
josh3736