Pushing user to page with POST data
<p>Hello i have this code for an upload bar and i want it to push the user to a page with the POST data. Here is the code, i am sorry its very long, i can paste bin it if you would like!</p>

<pre><code>try
{
if(navigator.appVersion.indexOf("MSIE") != -1)
    throw "IE - Use Fallback";


var xhr = new XMLHttpRequest();
if (xhr.onload !== undefined &amp;&amp; xhr.addEventListener !== undefined) //&lt;-----------------------------------------------
{
    //Browser supports W3C Progress Events

    var upload = function()
    {
        document.getElementById('form').setAttribute('onsubmit', 'return false');

        var e = document.getElementById('files');
        var url = "uploaded.php";
        var file = e.files[0];

        //if file is empty, return false;
        if(e.files[0] == undefined)
        {
            alert('File Field Empty');
            return false;
        }

        //file size to large
        var max = document.getElementsByName("MAX_FILE_SIZE");
        if(file.size &gt; max[0].value)
        {
            alert('File Too Large');
            return false;
        }

        document.getElementById('submit_btn').setAttribute('value', '\u2191 Uploading...');

        //var xhr = new XMLHttpRequest();
        xhr.file = file; //--
        xhr.addEventListener('progress', function(e)
        {
            var done = e.position || e.loaded, total = e.totalSize || e.total;              

        }, false);

        if(xhr.upload)
        {
            xhr.upload.onprogress = function(e)
            {
                var done = e.position || e.loaded, total = e.totalSize || e.total;
                var width = (Math.floor(done / total * 100)) * 3.5;

                //Move up progress bar
                document.getElementById('progress_done').style.width = width + 'px';
                document.getElementById('num').innerHTML = (Math.floor(done / total * 1000) / 10) + '%';
            };
        }

        xhr.onreadystatechange = function(e)
        {
            if(4 == this.readyState)
            {
                document.getElementById('num').innerHTML = this.responseText;
                document.getElementById('submit_btn').setAttribute('value', '\u2191 Upload File');
            }
        };

            xhr.open('POST', url, true);
            xhr.setRequestHeader("Content-Type", "multipart/form-data");
            xhr.setRequestHeader("Cache-Control", "no-cache");
            xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
            xhr.setRequestHeader("X-File-Name", file.name);
            xhr.setRequestHeader("X-File-Size", file.size);                
            xhr.setRequestHeader("X-File-Type", file.type);
            xhr.setRequestHeader("Content-Type", "multipart/form-data");
            xhr.send(file);

        };
}
else
{
    throw 'Run Fallback';
}
}
catch(e)
{
//Fallback, use iframe method   

window.onload = function()
{       
    if( navigator.appVersion.indexOf("MSIE 7") != -1 ||
        navigator.appVersion.indexOf("MSIE 6") != -1 ||
        navigator.appVersion.indexOf("MSIE 5") != -1  )
        {
            document.getElementById('progress_outline').style.display = 'none'; //------------------
            document.getElementById('frame').style.display = 'block'; //----------------------------
        }
}

var upload = function()
{
    document.getElementById('form').setAttribute('onsubmit', 'return false');
    var e = document.getElementById('files').value;     
    if(e.length == 0)
    {
        alert('File Field Empty');
        return false;
     }

    //file size to large
    var max = document.getElementsByName("MAX_FILE_SIZE");
    if(e.size &gt; max[0].value)
    {
        alert('File Too Large');
        return false;
    }

    document.getElementById('progress_bar').style.backgroundColor = '#e6e6e6';//&lt;------------------------------
    document.getElementById('submit_btn').setAttribute('value', '\u2191 Uploading...');

    document.getElementById('form').setAttribute('target', 'frame');
    document.getElementById('num').innerHTML = '&lt;img src="ajax-loader.gif" alt="ajax-loader" width="16" height="11" /&gt; Uploading...';
    document.getElementById('frame').setAttribute('onload', 'uploaded();');
    form.submit();
};

var uploaded = function()//-----------------------------------------------------------------------
{
    document.getElementById('progress_bar').style.backgroundColor = '#e7f6e2';
    document.getElementById('submit_btn').setAttribute('value', '\u2191 Upload File');

    var shortURL = window.frames['frame'].document.getElementsByTagName('body')[0].innerHTML;

    if( shortURL.length == 0 )
    {
        document.getElementById('progress_bar').style.backgroundColor = '#d56a68';
        document.getElementById('num').innerHTML = 'Sorry, problem during upload.';
    }else
    {
        document.getElementById('num').innerHTML = shortURL;
    }
};//-------------------------------------------------
}
</code></pre>
