Ciao a tutti spero tanto possiate darmi una mano,
ho visto un tutorial dal quale ho estrapolato il codice che mi serve, anche se, non mi carica nessuna immagine, potete dirmi cosa sbaglio o se devo aggiungere qualcosa?
il link del tutorial è il seguente;
http://www.zurb.com/playground/ajax_upload
la parte che vorrei far mia è quella "New Hotness"
Adesso vi posto cio che ho fatto...............
*******************************codice************* **********************
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ajax Upload</title>
<script src="script/jquery_lib_142.js"></script>
<script src="script/ajaxupload.js"></script>
<script>
$(document).ready(function(){
var thumb = $('img#thumb');
new AjaxUpload('imageUpload', {
action: $('form#newHotnessForm').attr('action'),
name: 'image',
onSubmit: function(file, extension) {
$('div.preview').addClass('loading');
},
onComplete: function(file, response) {
thumb.load(function(){
$('div.preview').removeClass('loading');
thumb.unbind();
});
thumb.attr('src', response);
}
});
});
//function initZURB(){}
</script>
<style>
span.wrap { padding: 10px; }
span.wrap.hotness { margin-left: 30px; }
span.wrap.old-and-busted { width: 358px; }
span.wrap button { display: block; margin-top: 10px; }
span.wrap label { margin-bottom: 5px; }
div.preview { float: left; width: 100px; height: 100px; border: 2px dotted #CCCCCC; }
div.preview.loading { background: url(image/ajax-loader.gif) no-repeat 20px 20px; background-position:center; }
div.preview.loading img {display: none; }
/* input#imageUpload { width: 400px; }*/
div.highlight { margin-bottom: 20px; }
span.wrap form { margin: 0; }
</style>
<link rel="icon" href="/playground/favicon.ico" type="image/x-icon" />
</head>
<body id="ajaxUploadPage" class=" ">
<div id="pageHeader">
<div style="float: left; position: absolute; left: 500px;">
<h2>New Hotness</h2>
<div class="column-row">
<div class="seven columns">
<div class="preview">
[img]/playground/images/icons/128px/zurb.png[/img]
</div>
<span class="wrap hotness">
<form id="newHotnessForm" enctype="multipart/form-data" action="ajax-upload.html">
<label>Upload a Picture of Yourself</label>
<input type="file" id="imageUpload" size="20" />
<button type="submit" class="button">Save</button>
</form>
</span>
</div>
</body>
</html>