Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Input type='file' x client side validation...

Input type='file' x client side validation...

Scheduled Pinned Locked Moved Web Development
javascriptbeta-testingregexhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    joaoPaulo
    wrote on last edited by
    #1

    sorry about my english... I'm using a one input type='file' and one input type='submit' in a form with method='post'... Problem: - On InternetExplorer 6.0 (beta 7 too) when the value of input file is any garbage like 'sasdfa' the submit doesnt work. probably cause the IE know with 'sasdfa' is a invalid file.... On firefox the submit works fine.. What i Need: - I wanna know the same think IE knows(if the file is valid or not) at client side by javascript on form 'onSubmit' method. I dont want use a RegEx over the input file text value. I'm just looking for some way to know if the file is valid.. or not.. thanks! blitzkrieg bop!!

    V 1 Reply Last reply
    0
    • J joaoPaulo

      sorry about my english... I'm using a one input type='file' and one input type='submit' in a form with method='post'... Problem: - On InternetExplorer 6.0 (beta 7 too) when the value of input file is any garbage like 'sasdfa' the submit doesnt work. probably cause the IE know with 'sasdfa' is a invalid file.... On firefox the submit works fine.. What i Need: - I wanna know the same think IE knows(if the file is valid or not) at client side by javascript on form 'onSubmit' method. I dont want use a RegEx over the input file text value. I'm just looking for some way to know if the file is valid.. or not.. thanks! blitzkrieg bop!!

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      The best you can control for a FileControl in JavaScript is to see the fullPath (as a string) in JavaScript. You can not say whether the file is existing or its size. Only after the file gets submitted, you can check regarding whether some file came or its size. Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
      http://deepakvasudevan.blogspot.com/
      http://deepak.blogdrive.com/

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups