Jquery recall upload function from external file
<p>I'm using Valums script to upload files on server. </p>

<p>The script is called from an external file as "createUploader" function:</p>

<pre><code>function createUploader(){  
new AjaxUpload('prft', {
action: 'nf.php', // I disabled uploads in this example for security reaaons
onSubmit : function(file, ext){
        if (ext &amp;&amp; /^(jpg|png|jpeg|gif)$/.test(ext)){
            /* Setting data */
            this.setData({
                'xbs': '1'
            });

        }

    },

onComplete: function(file, response){

$(".img1").html('&lt;a href=""&gt;&lt;img src="uploads/'+response+'" border="0" /&gt;&lt;/a&gt;&lt;a href="javascript:void(0);" cl="1" class="act" rel="'+ response +'" cl="1"&gt;delete image&lt;/a&gt;');
  }     

 });
</code></pre>

<p>This function works correctly as well as the next, which serves to delete uploaded photo which is also a call from an external file. </p>

<pre><code>$(".act").live("click", function(){
var rel= $(this).attr('rel'); 
var cl= $(this).attr('cl'); 
$(".img"+cl).html('&lt;div class="pod_img_vl"&gt;&lt;img src="spinner.gif"&gt; deleting photo&lt;/div&gt;');

$.ajax({
type: "POST",
url: "dl.php",
data: "pic="+ rel,
success:
    function(responseData)
    {

       $(".img"+cl).html('&lt;div class="pod_img_vl"&gt;&lt;div class="pret_img"&gt;&lt;i class="no_img"&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;a href="javascript:void(0);" id="prft"&gt;upload new photo&lt;/a&gt;');
    },
error:
    function(responseData)
    {
        alert(responseData);
    }

    });
    return false; 
    });
</code></pre>

<p>The problem occurs after successful deletion of the uploaded image when the link for re-upload new image appears. Click on the link "upload new photo" with id "prft" should fire again function createUploader() but this does not happen.</p>

<p>How can I solve this problem and recall function for uploading pictures?</p>

<p>Thanks for any suggestion.  </p>
