RunDown BassMan

RunDown BassMan

  • NA
  • 22
  • 28.7k

Testing input form values for empty fields

Sep 18 2014 5:20 AM

Hey, I'm creating a bulletin board application for my company, a user will be able to add a bulletin as well as a file. After, this will be entered into our SQL database in order for the bulletin board ticker to pick them up. I would like to test if the form input field for the file uploader is null. If it is, upload a file that I give it in the code, This is what I've tried but no joy so far -

function isFileNull()
{
 if (document.getElementById('FTU').value == null)
 {
  document.getElementById('FTU').value = "http://dinoweb1.fhcdom.net/FHCIntranet/Bulletin%20board/NoFileUploaded.txt";
 }
}
 
Any ideas out there?
Thanks.  
 
 

Answers (1)