Click here to Skip to main content
15,894,540 members

Comments by BrianHamilton (Top 26 by date)

BrianHamilton 7-Feb-15 11:27am View    
Deleted
Code will not post properly for some reason: hope this works

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>File API</title>
<script>
function processFiles()
{

var filelist = document.getElementById('files').files;


for(var i=0; i<filelist.length; i++)
="" {
=""
="" var="" file="filelist[i];
" texttype="/text.*/;
"

="" if="" (file.type.match(texttype))="" {="" reader="new" filereader();
="" reader.="">
</head>
<body>
Select a text file:
<input type="file" multiple id="files" />
</body>
</html>
BrianHamilton 7-Feb-15 11:14am View    
The code will not allow me to open multiple files - if I add the multiple attribute it will still only display the contents of the last file selected rather than the contents of all files.
BrianHamilton 10-Nov-14 5:59am View    
Objects are passed by reference, not value. Thanks!
BrianHamilton 24-Nov-13 8:30am View    
That worked - I tried dividing by 2, 2.2, 2.5 ... and it turns out the code was working - my brain wasn't. Thanks for the help.

Brian.
BrianHamilton 7-Aug-13 0:11am View    
Show the code you have written so far.