on 02-16-2006 7:07 AM
Hi Friends,
please let me know how to assign browseTo Button in Java Scipt & Html,so that the browser should be automatically choose c,d drives of system to attach some pdf files. The way I assigned is
<input type="Button" style="background-color: #ffffff" onclick="browseTo('C:Documents and Settings')" value="Browse " > </td>
Is this correct ,if not pls mail me how to do this.
Regards
CSM Reddy
Hi ,
use
<FORM NAME="oForm"
ACTION="repost.asp"
ENCTYPE="multipart/form-data"
METHOD="post">
<INPUT TYPE="file" NAME="oFile1"/>
<INPUT TYPE="submit" VALUE="Upload File">
</FORM>
Regards
Kishor Gopinathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks, it is working, but I want to assign the same colour for both buttons, upload file & browse.
<INPUT TYPE="file" style="background-color: #ffffff" NAME="oFile1"/>
<INPUT TYPE="submit" style="background-color: #ffffff" VALUE="Upload File">
I am getting two different colours for two buttons. pls mail me how to assign the same colour for both of them?
Hi ,
u can alternatively use this .
<html>
<head>
<title>File Upload Example</title>
<script language="JavaScript" type="text/javascript">
function HandleFileButtonClick()
{
document.frmUpload.myFile.click();
document.frmUpload.txtFakeText.value = document.frmUpload.myFile.value;
}
</script>
</head>
<body>
<form name="frmUpload">
<!-- Real Input field, but hidden-->
<input type="file" name="myFile" style="display: none">
<!-- Fake field to fool the user -->
<input type="text" name="txtFakeText">
<!-- Button to invoke the click of the File Input -->
<input type="button" onclick="HandleFileButtonClick();" value="Upload File" style="background: #ededed;">
</form>
</body>
</html>
Regards
Kishor Gopinathan
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.