View Single Post
  #4 (permalink)  
Old August 21st, 2003, 04:17 AM
joefawcett's Avatar
joefawcett joefawcett is offline
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I don't know what rich text fields are in relation to web pages. Do you mean if an input box of type equal to 'file' has a value in it? If so then:
Code:
<form name="frmUpload" onsubmit="validateForm();">
<input type="file" name="txtFile">
<input type="submit">
</form>
<script>
function validateForm()
{
  if (document.frmUpload.txtFile.value = "")
  {
    alert("You have not selected a file to upload.");
    return false;
  }
  return true;
}


</script>

--

Joe
Reply With Quote