Firefox doesn't fire onblur event

Discussion in 'JavaScript' started by SGBoise, Jun 25, 2008.

  1. #1
    Hey guys.

    I have a little annoying problem with firefox. Believe or not, this actually works on ie:confused:.

    Firefox will not fire the onblur/lostfocus event when I have a input field with the type of file. When I change the type to text it works.

    Here is a sample to reproduce the problem.

    function test(){
    	alert ("Event Fired");
    }
    HTML:
    <form method="POST" action="" enctype="multipart/form-data">
    	<p><input type="text" name="T1" size="20" value="Works" onfocus="return test()"><br>
    	<input type="file" name="F1" size="20" onfocus="return test()"></p>
    	<p>&nbsp;</p>
    	<p><input type="submit" value="Submit" name="B1"></p>
    </form>
    HTML:

    Anyone know a work around this for firefox?
     
    SGBoise, Jun 25, 2008 IP