IE supports .click() on an
input type="file"
field/button combination. How do I get that behavior with FireFox? I am overlaying the actual input field and browse button with a span having a dummy input field/button combination that lists valid extensions and when a user clicks either of the dummy elements the containing span gets styled display:none and the real field and Browse buttons are displayed.
I also want to trigger the real Browse button's .click() event and open the OS command window to browse to the desired file as if the use had simply clicked the real button. This works for IE but in FF the dummy field goes away and the user has to click again on the real Browse button to open the command window.
function showBrowse(){
var oDummy=document.getElementById('spnDummyFileBrowse');
var oBrowse=document.getElementById('inpFileBrowse');
oDummy.style.display='none';
oBrowse.style.display="";
oBrowse.click();// <--- This works for IE but not FireFox??????
}
input type="file"
field/button combination. How do I get that behavior with FireFox? I am overlaying the actual input field and browse button with a span having a dummy input field/button combination that lists valid extensions and when a user clicks either of the dummy elements the containing span gets styled display:none and the real field and Browse buttons are displayed.
I also want to trigger the real Browse button's .click() event and open the OS command window to browse to the desired file as if the use had simply clicked the real button. This works for IE but in FF the dummy field goes away and the user has to click again on the real Browse button to open the command window.
function showBrowse(){
var oDummy=document.getElementById('spnDummyFileBrowse');
var oBrowse=document.getElementById('inpFileBrowse');
oDummy.style.display='none';
oBrowse.style.display="";
oBrowse.click();// <--- This works for IE but not FireFox??????
}