I have a file inputfile
<input tye='file' id='funPic' name='funPic' />
I need to get the name of the selected file,
$('#funPic').val() in Firefox and Chrome gives abc.jpg where as IE7 & IE8 gives c:\xyz\abc.jpg
Why is this? I need only the abc.jpg part.
Use
Mozilla and other browsers don’t give the full path for security reasons. IE will only give the filename when the page runs outside the local security zone.
http://msdn.microsoft.com/en-us/library/ms535126(v=VS.85).aspx