I'm trying to create a ajax file upload module. Please look at the following code snippet, 

```
//create the form for uploading the file the ajax file
FileUploader.prototype.createForm = function() {
    // create the new form
    var form = document.createElement('form');
    form.id = this.form_id;
    form.action = this.url;
    form.method = 'post';
    form.enctype = 'multipart/form-data';
    form.target = 'file_upload_iframe';

    // try to create a file type of input failed at [1]
    /* var input_file = document.createElement('input');
    input_file.type = 'file';
    input_file.name = this.name;
    input_file.value = this.file;  [1] */

    // try to clone the input file but failed to insert it to the old form[2] 
    // or the new form [3] either
    var input_file = document.getElementById('userfile');
    var new_input_file = document.cloneNode(true);
    // document.getElementById('file_upload').appendChild(new_input_file); [2]
    new_input_file.id = ''; 

    form.appendChild(new_input_file); // [3]
    document.body.appendChild(form);
    return form;
};

```

1. Why at the place [1] I have get a security error `Security error" code: "1000`, could you give a reference source?
2. Why I could not append the new\_input\_file into the new created form[3] or even append the new cloned new\_input\_file into the old form([2])?

Thanks.