| Server IP : 104.21.80.248 / Your IP : 172.71.28.155 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/news/cooprat/bootstrap2/js/ |
Upload File : |
// Empty JS for your own code to be here
// Pretty file
if ($('.prettyFile').length) {
$('.prettyFile').each(function() {
var pF = $(this),
fileInput = pF.find('input[type="file"]');
fileInput.change(function() {
// When original file input changes, get its value, show it in the fake input
var files = fileInput[0].files,
info = '';
if (files.length > 1) {
// Display number of selected files instead of filenames
info = files.length + ' files selected';
} else {
// Display filename (without fake path)
var path = fileInput.val().split('\\');
info = path[path.length - 1];
}
pF.find('.input-append input').val(info);
});
pF.find('.input-append').click(function(e) {
e.preventDefault();
// Make as the real input was clicked
fileInput.click();
})
});
}
$("[type=file]").on("change", function(){
// Name of file and placeholder
var file = this.files[0].name;
var dflt = $(this).attr("placeholder");
if($(this).val()!=""){
$(this).next().text(file);
} else {
$(this).next().text(dflt);
}
});