<iframe name="myframe" style="display:none"></iframe> <form id="post" method="post" action="/post.php" target="myframe"> <input type="file" name="file"><br/> <input type="submit"> </form>