<script>
function attachFile(){
document.getElementById("file").click();
return;
}
</script>
<form name="novsh" style="margin: 0px; padding: 0px;">
<input type="file" name="file" style="display:none" id="file" />
</form>
<a href="javascript:attachFile()">Attach File</a>
<input type="button" name="btn" value="click me" onclick="attachFile()"/>
I've written like this and it's working on IE but not working on FireFox