Welcome to WebmasterWorld Guest from 54.167.83.224

Forum Moderators: incrediBILL

Message Too Old, No Replies

ie input file invalid file

     
7:48 pm on Jun 15, 2010 (gmt 0)

New User

5+ Year Member

joined:June 15, 2010
posts: 2
votes: 0


Hi, i've got the same problem than a previous topic (ie input file invalid file) that wasn't resolved.

I finally find a way to detect if the value type in a input type="file" exist on the client computer.

You only need some javascript in the onclick event of the submit button.
here an example :

try{
frmUpload.submit();
}catch(ex){
alert(errorMessage);

}


If the file doesn't exist submit throw an unauthorized access error. By catching this error you now know that the file doesn't exist or is restricted to the user.
6:31 am on June 16, 2010 (gmt 0)

Administrator from JP 

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 12, 2000
posts:14487
votes: 49


Welcome to WebmasterWorld magnamux.

Are you referring to a previous thread on WebmasterWorld? Could you post a link to that thread?
1:04 pm on June 16, 2010 (gmt 0)

New User

5+ Year Member

joined:June 15, 2010
posts: 2
votes: 0


Yes i am. Here the link :[webmasterworld.com ]