The Tech Pursuit
The Dev Shelf
Pages
Home
Interview Questions
About Me
April 27, 2011
Create File Upload validator in Java Script
var FUpload = document.getElementById('<%= fileUpl.ClientID %>');
var myfile = FUpload.value;
if (myfile == "")
{
alert('Please select any file!');
return false;
}
else
{
if (myfile.indexOf("pdf") < 0)
{
alert('Please select PDF file!');
return false;
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment