I want to run this code on ONCHANGE event
Posted: Wed Dec 13, 2006 1:47 am
Hello i have a little PHP code. The code give output(returns complete path of file) when user press "SUBMIT" button. I want to run this code on 'ONCHANGE' event of the 'BROWSE' button. means when user press the browse button, then instead of pressing submit button, the code returns the desired result. Plz help me in modifying this code, so that it gives output on 'ONCHANGE' event
Please help
Code: Select all
<?
print "PATH = ".$_REQUEST['path'];
?>Code: Select all
<form name="viewPage" method="post" enctype="multipart/form-data" onSubmit="this.path.value = this.myfile.value;" action="complete_path.php?submit=yes">
<input type="hidden" name="path">
<input type="file" name="myfile">
<input type="submit" name="aaa">
</form>