I want to send some additional (form) field data using an append. For this purpose I use scriptData. For example, the following code correctly sends the static values ββof the name field and location.
<script type="text/javascript">
$(document).ready(function() {
$("#fileUpload").fileUpload({
'uploader': 'uploadify/uploader.swf',
'cancelImg': 'uploadify/cancel.png',
'script': 'uploadify/upload.php',
'folder': 'files',
'multi': false,
'displayData': 'speed',
'scriptData': {'name':'JohnDoe', 'location':'Australia'}
});
});
</script>
However, since I have the name and location of the input fields, so I want to send dynamic values. To do this, Im sends the values ββto ScriptData as follows
'scriptData' : {'name' : $('#name').val(), 'location' : $('#location').val()}
And on upload.php, I'm trying
$name = $_GET['name'];
$location = $_GET['location'];
But he does not get any meaning. Please help me with this, as I can send additional field data. Thank.
source
share