In order to internationalize I used fake button technique. When I try the fake button everything happens fine except that form does not submit.
It only submits when I click the actual browse button and select the file.
Can some one throw some light on this behaviour.
<html>
<script>
function triggerFileUpload()
{
try{
document.getElementById("theFile").click();
}catch(e){
alert(e);
}
}
function setHiddenValue()
{
document.getElementById("dummyField").value = document.getElementById ("theFile").value;
}
</script>
<body>
<div id="dummyDiv">
<form action="http://www.google.com">
<input type="Text" disabled="disabled" class="inputField" id="dummyField"/>
<input type="button" class="inputField" value="Buscar Archivo" onclick="triggerFileUpload()"/>
</div>
<div id="uploadDiv" style="display: block;">
<input type="file" id="theFile" name="theFile" onchange="setHiddenValue()"/>
</div>
<input type="submit" value="submit"/>
</form>
</body>
</html>