How to list the names of files successfully uploaded?
<p>I have a a form which contains a file input and upload button</p>

<pre><code>&lt;form action='imageupload.php' method='post' enctype='multipart/form-data' target='upload_target' onsubmit='stopImageUpload(this);' class='imageuploadform' &gt;
    &lt;p class='imagef1_upload_form' align='center'&gt;&lt;label&gt;Image File: &lt;input name='fileImage' type='file' class='fileImage' /&gt;&lt;/label&gt;
        &lt;input type='submit' name='submitImageBtn' class='sbtnimage' value='Upload' /&gt;&lt;/label&gt;
    &lt;/p&gt;
    &lt;p&gt;&lt;span class='list&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/form&gt;
</code></pre>

<p>Now what I want is that if an image has finished uploading, at the bottom of this form (in the span tag 'list') I want the name(s) of the file that have been uploaded. So when a file is successfully uploaded, then it should display the name of the uploaded file. If a second file is successfully upoaded, then it displays the name of the uploaded second file below the name of the first file. 
Is this possible in Javascript?</p>

<p>I have uploading of files all sorted out in php and javascript. Below is javascript function after uploading is complete:</p>

<pre><code>function stopImageUpload(success) {
    var result = '';
    if (success == 1) {
        result = '&lt;span class="msg"&gt;The file was uploaded successfully!&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;';
    }
    else {
        result = '&lt;span class="emsg"&gt;There was an error during file upload!&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;';
    };
    return true;
}​
</code></pre>

<p>This function is in the same page in the fomr but not in the same page as the uploading script but in the uploading script does call on this function using this javascript code below:</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;window.top.window.stopImageUpload(&lt;?php echo $result; ?&gt;);&lt;/script&gt; 
</code></pre>

<p>Below is part of the uploading php code where it uploads the file into the server:</p>

<pre><code>move_uploaded_file($_FILES["fileImage"]["tmp_name"],"ImageFiles/" . $_FILES["fileImage"]["name"]);
$result = 1;
</code></pre>
