Dear Friends,
I did a file type validation in Javascript. Just i want to check
whether a selected file is BMP or JPG. I wrote the following function
for it.
function checkType(){
Text = document.frm.file.value
if(Text.indexOf(":\\") == 1)
{
if("bmp" == Text.substring((Text.length - 3), Text.length) || "jpg"
== Text.substring((Text.length - 3), Text.length))
return true;
}
return false;
}
It is working Fine in IE6 ,Mozilla, Opera but it is not working IE7.
Because in IE7 if i put alert for document.frm.file.value it showing
only the file name, not file path (Ex: if i select a file e:\test.zip)
in IE7 it giving only test.zip. But i need the full path e:\test.zip
then only my first if condition will be satisfied. This problem only in
IE7.
Please help me is there any way to overcome this problem? or this is
problem of IE7.
Thanks in advance
Sriram.