Hello,
I have no such information or you can say less information about the ajax can anyone help me out the thing is that i want to pass dir id in the get url but that get id will be selected by the user though from a drop down i mean the user will select the dir name i mean dir name then he will upload the image on same section so how do i pass the dir name.
<div id="mulitplefileuploader">Upload</div>
<div id="status"></div>
<select name="dirname">
<option name="1">Sports Images</option>
<option name="2">Bike Images</option>
<option name="3">Nature Images</option>
<option name="4">Sunset Images</option>
<option name="5">3d Images</option>
</select>
<?php $dir = $_REQUEST["dirname"]; ?>
<script>
$(document).ready(function()
{
var settings = {
url: "upload.php?uid=<?php echo $_SESSION["uid"]."&dirname=".$dir;?>",
method: "POST",
allowedTypes:"jpg,png,gif",
fileName: "myfile",
multiple: true,
onSuccess:function(files,data,xhr,dirname)
{
$("#status").html("<font color='green'>Upload is success</font>");
},
onError: function(files,status,errMsg)
{
$("#status").html("<font color='red'>Upload is Failed</font>");
}
}
$("#mulitplefileuploader").uploadFile(settings);
});
</script>