Bonjour,
Je sais pas si le sujet est assez explicite.
En fait, j'ai un formulaire qui permet d'uploader une photo à la fois, et j'essaie de le changer pour qu'a chaque fois que le champ file change, le fichier soit upload.
Voila ce que j'avais :
<form name='form1' id='form1' method='post' action='upload_picture.php' enctype='multipart/form-data'>\n
<table width='100%' border='0' align='center'>\n
<tr height='30'>\n
<td align='right' width='20%'>\n
<img src='pics/spacer.png' width='20' height='10' />\n
<label>Photo : </label></td>\n
<td align='left'><input name='file' id='file' type='file'/></td>\n
</tr>\n
<tr height='30'>\n
<td align='right' width='20%'>\n
<img src='pics/spacer.png' width='20' height='10' />\n
<label>Comment : </label></td>\n
<td align='left'><textarea name='comment' id='comment' cols='45' rows='5'></textarea></td>\n
</tr>\n
<tr height='30'>\n
<td colspan='4' align='center'>
<input name='signup' type='submit' value='Upload' />
</td>\n
</tr>\n
</table>\n
</form>\n
et je veux qu'au lieu d'uploader le fichier quand on clic sur Upload, il s'upload sur un onChange au niveau du champ file, comme ceci :
<td align='left'><input name='file' id='file' type='file'
onchange='upload.php'/></td>\n
mais je ne sais pas quel syntaxe utiliser.
Merci de votre aide