JavaScript code. Need help

wxdqz

New Member
I have a script:

<SCRIPT LANGUAGE="JavaScript"><!--
var filename;
function validate() {
filename = document.myform.mid.value;
}

//--></SCRIPT>

<FORM NAME="myform" onSubmit="return validate()">
<INPUT type="file" name="mid">
<INPUT TYPE="SUBMIT" NAME="mybutton">
</FORM>


Variable filename contain a path to the file that selected a user after pressing SUBMIT button.
I'd like to have a variable (for ex. string variable) that would contain the data of the selected file!
As I understand I need a code that open this file to a streem (or smth like that) and copy containing of file to my variable.

I wounder if smbd can help me with a code or sourses links or ideas.

Thanks a lot.
 
Back
Top