<script src="../js/ajaxupload.js" type="text/javascript"></script>// http://github.com/valums/ajax-upload لینک دانلود فایل و راهنما js
<script type="text/javascript">/*<![CDATA[*/
function attach_valid(param){
url = 'save_draft.php';
$.post(url, {allParam:param}, function(data)
{
//alert(data+"----"+$('#draft_id_input').val());
if($('#draft_id_input').val() == 'empty' ){
$('#draft_id_input').val(data);
}
}, 'json');
}
$(document).ready(function(){
var button = $('#button1'), interval;
/* Example 2 */
new AjaxUpload('button2', {
action: 'do-upload.php',
data : {
'key1' : "This data won't",
'key2' : "be send because",
'key3' : "we will overwrite it"
},
onSubmit : function(file , ext){
// Allow only images. You should add security check on the server-side.
/* Setting data */
this.setData({
'key': 'D_'+$('#draft_id_input').val()+"_"+"<?php echo $Active_ClerkID.'_';?>"
});
// Uploding -> Uploading. -> Uploading...
interval = window.setInterval(function(){
var text = button.text();
if (text.length < 15){
button.text('.' + text);
} else {
button.text('در حال آپلود');
}
}, 200);
},
});
});/*]]>*/
</script>
من خودم اینکارو انجام دادم اما یکم اذیت شدم اگه کسی سوال داشت پیام بده