davidinparis
Programmer
Good morning.
I am developing a Yahoo like e-mail processor and have a problem in selecting the names of attachment files. I want the processing of the files attached to be handled entirely withing Javascript.
I can open the Windows file select window using the following code:
<body>
<script language="javascript">
function browsefiles(elementname)
{
document.getElementById(elementname).click();
}
function filename(elementname)
{
// application code
}
</script>
<input type="button" id="myFile" value= "select" name="myFile" onclick="browsefiles('thefile');">
<input type="file" style='display:none;' id="thefile" value= "choose" name="fileselected" >
</body>
but can find no means of transmitting the file name and path back to the code in filename. Could someone assist?
This code does not seem to function in either Firefox or in Opera. Any suggestions.
Many thanks in advance.
David.
I am developing a Yahoo like e-mail processor and have a problem in selecting the names of attachment files. I want the processing of the files attached to be handled entirely withing Javascript.
I can open the Windows file select window using the following code:
<body>
<script language="javascript">
function browsefiles(elementname)
{
document.getElementById(elementname).click();
}
function filename(elementname)
{
// application code
}
</script>
<input type="button" id="myFile" value= "select" name="myFile" onclick="browsefiles('thefile');">
<input type="file" style='display:none;' id="thefile" value= "choose" name="fileselected" >
</body>
but can find no means of transmitting the file name and path back to the code in filename. Could someone assist?
This code does not seem to function in either Firefox or in Opera. Any suggestions.
Many thanks in advance.
David.