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
A

alaki_p

@alaki_p
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • input type ="file" control for file uploading.
    A alaki_p

    Hi dude... try it... ========================================================= function checkFileExtension(elem) { var filePath = elem.value; if(filePath.indexOf('.') == -1) return false; var validExtensions = new Array(); var ext = filePath.substring(filePath.lastIndexOf('.') + 1).toLowerCase(); validExtensions[0] = 'txt'; validExtensions[1] = 'doc'; validExtensions[2] = 'rtf'; for(var i = 0; i < validExtensions.length; i++) { if(ext == validExtensions[i]) return true; } alert ('You Cant upload a '+ext.toUpperCase()+' file!'); return false; } ============================================================ * and now use this line in your code behind (this line used in VB.Net!!!) =========================================================== myfile.Attributes.Add("onchange", "return checkFileExtension(this);") ============================================================ :rolleyes: be cool...

    Web Development
  • Login

  • Don't have an account? Register

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