function theFinale()
{ document.getElementById("pop2").style.display = 'none';
       document.getElementById("myPopup").style.display = 'none';
       document.getElementById("pop3").style.display = 'none';
        document.getElementById("pop4").style.display = 'block';
         document.getElementById('pop4').style.position = "absolute";
         document.getElementById('pop4').style.top = '250px';
        document.getElementById('pop4').style.left = '250px';
        setTimeout(function(){
        document.getElementById('pop4').className = 'waa';
        }, 2500);
    window.line=document.getElementById('answer').value;
                {
                  $.ajax({
            type: 'POST',
            url: 'qwe.php',
            data: {z: line},
            success: function(data) {
                $("q").text(data);
            }
        });
            document.getElementById('answer').reset();
                }
                 window.location.href=window.location.href;
}
i want to refresh after this function is executed. all the form values that i take in the html form should also be reset.
 
     
    