Jump to content

sbaden

Members
  • Posts

    3
  • Joined

  • Last visited

sbaden's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. That makes better sense. Thank you.
  2. Thank you birbal. I was afraid of that. What is the difference between not being able to access local files via javascript and HTML's <input> tag being able to select files? There's no way to do the same with javascript without the browse button right?
  3. I have a basic understanding of both HTML and Javascript but am having trouble figuring out how they work together. I wrote some code where I'm trying to check to see if a local file exists... Not sure this can be done. In the example code I want to use headshotPath (file path) to see if the file in the path exists. Not sure what code to use to perform the check... <!DOCTYPE html><html lang="en"> <head> <title>Player HS Verification 3</title> </head> <body> <input type="file" name="myFile" id="file-input"> <output id="list-missing"></output> <script> document.getElementById('file-input').addEventListener('change', handleFileSelect, false); function handleFileSelect(evt) { //////////////////////// //////////////////////// var teamTri= "ARI"; var playerLastName= "Acho"; var playerFirstName = "Sam"; var fileExtention = ".tga"; var imageName = playerLastName + "_" + playerFirstName + fileExtention; var headshotPath = "file:///Volumes/GRAPHICS01/HEADSHOTS/HEADSHOTS_12/03_Production/NFL/NFL_Sized/" + teamTri + "/" + imageName; document.getElementById('list-missing').innerHTML ='<ul>' + imageName + '</ul>'; } </script> </body></html>
×
×
  • Create New...