need help understanding javascript programing structure
<p>I've got a script like below</p>

<pre><code>       qq.UploadHandlerForm = function(o){
        this._options = {
            action: '/upload',
            onComplete: function(id, fileName, response){}
        };
        qq.extend(this._options, o);

        this._inputs = {};
    };

qq.UploadHandlerForm.prototype = {
    add: function(fileInput){
        fileInput.setAttribute('name', 'qqfile');
        var id = 'qq-upload-handler-iframe' + qq.getUniqueId();       

        this._inputs[id] = fileInput;

        // remove file input from DOM
        if (fileInput.parentNode){
            qq.remove(fileInput);
        }

        return id;
    },
    upload: function(id, params){                        
        var input = this._inputs[id];

        if (!input){
            throw new Error('file with passed id was not added, or already uploaded or cancelled');
        }                

        var fileName = this.getName(id);

        var iframe = this._createIframe(id);
        var form = this._createForm(iframe, params);
        form.appendChild(input);

        var self = this;
        this._attachLoadEvent(iframe, function(){            
            self._options.onComplete(id, fileName, self._getIframeContentJSON(iframe));

            delete self._inputs[id];
            setTimeout(function(){
                qq.remove(iframe);
            }, 1);
        });

        form.submit();        
        qq.remove(form);        

        return id;
    },
    cancel: function(id){        
        if (id in this._inputs){
            delete this._inputs[id];
        }        

        var iframe = document.getElementById(id);
        if (iframe){
            iframe.setAttribute('src', 'javascript:false;');

            qq.remove(iframe);
        }
    },
    getName: function(id){
        // get input value and remove path to normalize
        return this._inputs[id].value.replace(/.*(\/|\\)/, "");
    },  
    _attachLoadEvent: function(iframe, callback){
        qq.attach(iframe, 'load', function(){
            if (!iframe.parentNode){
                return;
            }
            if (iframe.contentDocument &amp;&amp;
                iframe.contentDocument.body &amp;&amp;
                iframe.contentDocument.body.innerHTML == "false"){
                return;
            }

            callback();
        });
    },
    _createIframe: function(id){
        var iframe = qq.toElement('&lt;iframe src="javascript:false;" name="' + id + '" /&gt;');
        iframe.setAttribute('id', id);

        iframe.style.display = 'none';
        document.body.appendChild(iframe);

        return iframe;
    },
    _createForm: function(iframe, params){
        var form = qq.toElement('&lt;form method="post" enctype="multipart/form-data"&gt;&lt;/form&gt;');
        var queryString = '';
        for (var key in params){
            queryString += "/"+ encodeURIComponent(params[key]);
        }

        form.setAttribute('action', this._options.action + queryString);
        form.setAttribute('target', iframe.name);
        form.style.display = 'none';
        document.body.appendChild(form);

        return form;
    }
};
</code></pre>

<p>I want to know what the "_" is used for, and what is "_createIframe: function(id){}" called? And what is "getName: function(id)" called ?</p>

<p>Secondly, I want to use the getName inside the "_createForm: function(iframe, params){}". How can I do it? I tried something like</p>

<pre><code> _createForm: function(id,iframe, params){var fn= this.getName(id)} 
</code></pre>

<p>but got an error</p>

<hr>

<p><em>EDIT: Adding info that was posted as an answer.</em></p>

<p>When I do   </p>

<pre><code>_createForm: function(iframe, params){
  var fname = this.getName(id);
    }
</code></pre>

<p>I got error "id is undefined". Then I try</p>

<pre><code> _createForm: function(id, iframe, params){
  var fname = this.getName(id);
    }
</code></pre>

<p>I got error "this._input[...].value is null or not an object"</p>
