H
hrpreet
Hi All,
I need the file chooser in the jsp, just for brosing and saving the
file path in the database, so i have used the following code.I dont
need to read the file content. I have to make it hidden because in
edit mode i need to show the field prepopulated with the file path,
which doesnot happen with input type=file, it cant be shown
prepopulated. But the following code gives access denied error.Please
help.
<html>
<head>
<script>
function browseFile(){
document.form.browse .click();
document.form.filename.value=document.form.browse.value;
return true;
}
</script>
</head>
<body>
<form name="test_form" method="post" action="test.jsp">
<input type=file name=browse style="display: none;">
<input type=text name=filename>
<input type=button value="Select a File..." onClick="browseFile();">
<input type=submit value="Submit The Form Now!">
</form>
</body>
</html>
Thanks for help.
I need the file chooser in the jsp, just for brosing and saving the
file path in the database, so i have used the following code.I dont
need to read the file content. I have to make it hidden because in
edit mode i need to show the field prepopulated with the file path,
which doesnot happen with input type=file, it cant be shown
prepopulated. But the following code gives access denied error.Please
help.
<html>
<head>
<script>
function browseFile(){
document.form.browse .click();
document.form.filename.value=document.form.browse.value;
return true;
}
</script>
</head>
<body>
<form name="test_form" method="post" action="test.jsp">
<input type=file name=browse style="display: none;">
<input type=text name=filename>
<input type=button value="Select a File..." onClick="browseFile();">
<input type=submit value="Submit The Form Now!">
</form>
</body>
</html>
Thanks for help.