<html>
<head>
<script type="text/
javascript">
function test(msg){
alert(msg);
}
</script>
</head>
<body>
<form action="test.php" enctype="multipart/form-data" method="post" target='hidden_iframe'>
<input type="file" id="file" name="file" />
<input type="submit" value="submit" />
</form>
<iframe name="hidden_iframe" id="hidden_iframe" style="display:none;" ></iframe>
</body>
</html>