/*
$(document).ready(function(){
$("body").delegate("#publish_blog","click",function(e){
e.preventDefault();
var nu_content = "<p>Hello World!</p>";
var blg_titl = $("#blog_title").val();
var blg_auth = $("#blog_content").val();
var blg_cont = $("#blog_author").val();
/*var fd = new FormData();
var files = $("#blog_image")[0].files[0];
fd.append("file",files);
$.ajax({
url:"blog_insert.php",
type:"POST",
data:fd,
contentType: false,
processData: false,
success:function(response){
if(response != 0){
alert("File Uploaded");
$("#upload_file").val("");
}else{
alert("File Not Uploaded");
}
}
});
});
});
$("body").delegate("#publish_blog","click",function(event){
/*
event.preventDefault();
var nu_content = "<p>Hello World!</p>";
var files = $("#blog_image")[0].files[0].name;
alert(files);
var nu_content = "<p>Hello World!</p>";
var form_data = new FormData();
var files = $("#blog_image")[0].files[0].name;
var blg_title = $("#blog_title").val();
alert(nu_content);
/*$.ajax({
url:"blog_insert.php",
type:"POST",
data: {form_data},
contentType: false,
processData: false,
success:function(response){
alert(response);
/*if(response == "fileType"){
alert("File Type Problem");
}else if(response == "titleType"){
alert("Please Add Some Title");
}else if(response == "authorType"){
alert("Please Add An Author");
}else if(response == "contentType"){
alert("Please Add Some Content");
}else if(response == "sizeType"){
alert("Please Reduce File Size");
}else if(response == "uploaded"){
alert("File Uploaded Successfully!");
$("#blog_content").val(nu_content);
}else{
alert(response);
}
}
});
});
*/