Salve a tutti, avrei un problemi sulla validazione del campo testo in quanto nel form che sto usando non è presente direttamente il tasto "submit" e quindi non so come integrare nella forma classica il controllo del campo!!!.....questo il codice della pagina:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>File Upload</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="mootools-1.2-core-nc.js"></script>
<script type="text/javascript" src="Swiff.Uploader.js"></script>
<script type="text/javascript" src="Fx.ProgressBar.js"></script>
<script type="text/javascript" src="FancyUpload2_DE.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
window.addEvent('load', function() {
document.getElement('b').appendText(' Detected Flash ' + Browser.Plugins.Flash.version + '!');
var swiffy = new FancyUpload2($('demo-status'), $('demo-list'), {
debug: true,
url: $('form-demo').action,
data: $('form-demo'),
fieldName: 'photoupload',
path: 'Swiff.Uploader.swf',
limitSize: 1150 * 1024 * 1024,
target: 'demo-browse',
onLoad: function() {
$('demo-status').removeClass('hide');
$('demo-fallback').destroy();
}
});
$('demo-select-images').addEvent('change', function() {
var filter = null;
if (this.checked) {
filter = {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'};
}
swiffy.options.typeFilter = filter;
});
$('demo-browse').addEvent('click', function() {
swiffy.browse();
return false;
});
$('demo-clear').addEvent('click', function() {
swiffy.removeFile();
return false;
});
$('demo-upload').addEvent('click', function() {
swiffy.upload();
return false;
});
});
</script>
<script type="text/javascript" src="common.js"></script>
</head>
<body bgcolor="#333333" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="add_handlers('load','cancella','go');">
<div align="center">
<table width="100%" height="162" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="header-bg"></td>
<td width="600" height="162" valign="bottom" background="images/header.gif" class="topmenu"> <div align="right">
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="200"></td>
<td width="200"><div align="center" class="footer5"></div></td>
<td width="200"><div align="right">Guida (?)</div></td>
</tr>
</table>
</div></td>
<td class="header-bg"></td>
</tr>
</table>
</div>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#333333">
<tr>
<td> <form action="script.php?<?= $append ?>" method="post" enctype="multipart/form-data" id="form-demo" >
<fieldset id="demo-fallback">
<label for="demo-photoupload">
<input type="file" name="photoupload" id="demo-photoupload" />
</label>
</fieldset>
<div id="demo-status" class="hide">
<input type="checkbox" id="demo-select-images" />
Solo immagini
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="195"><div id="demo-browse" class="scegli">[img]images/load.gif[/img]</div></td>
<td width="185"><div id="demo-clear" class="clear">[img]images/cancella.gif[/img]</div></td>
<td width="120"><div id="demo-upload" class="invia">[img]images/go.gif[/img]</div></td>
</tr>
</table>
<div>
<strong class="overall-title">Dimensione Totale (0 kB)[/b]
[img]images/bar.gif[/img]
</div></br>
<div>
<strong class="current-title">Invio[/b]
[img]images/bar.gif[/img]
</div>
<div class="current-text"></div>
<ul id="demo-list">[/list]
</div><div><INPUT TYPE=TEXT NAME="nome" size=30 id="nome">
</div>
</form> </td>
</tr>
</table>
</div>
</body>
</html>
grazie un saluto a tutti

Rispondi quotando