chrome and IE not containing values after creating clone of file type
<p>i am using the following code in order to create ajax upload script .my current task is to create a form on the fly using jquery so i do this by following code</p>

<pre><code>&lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;

&lt;input id="files" name="file" type="file" value=""/&gt;


&lt;script&gt;
$(document).ready(function () {

    $('#files').live('change', function () {
        var formId = 'jUploadForm';
        var form = $('&lt;form action="" method="POST" name="' + formId + '" id="' + formId + '" enctype="multipart/form-data"&gt;&lt;/form&gt;');
        var oldElement = $('#files');
        var newElement = $(oldElement).clone();


        $(oldElement).attr('id', 'files');
        $(oldElement).before(newElement);

        alert('fffffff');
        //alert(projectid);
        //return false;
        $(oldElement).appendTo(form);
    });
});
&lt;/script&gt;
</code></pre>

<p>The error in aboce code is that after appending newElement using before the file value which i have select will be gonemeans whatever i select from browse button that will be present in the cloned file type but will be removed from the original file type i have.
above problem is only occuring in chrome and IE it is working fine in mozila
Please help</p>
