New issue 124957 by chaitany...@gmail.com: File open dialog not opened with
hidden "<input type=file/>" tag
http://code.google.com/p/chromium/issues/detail?id=124957
Chrome Version : 18.0.1025.162
OS Version: 5.1 (Windows XP)
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5:
Firefox 4.x:
IE 7/8/9:
What steps will reproduce the problem?
1. Run below html code in chrome.
<html>
<script type="text/javascript">
function select_file()
{
var file = document.getElementsByName("s_file");
file[0].click();
}
function upload()
{
alert("In Upload") ;
}
</script>
<body>
<form enctype="multipart/form-data" method="post">
<input type="button" value="Click!" onclick="select_file()"/>
<input type="file" style="display:none" name="s_file" onchange="upload()"/>
</form>
</body>
</html>
2.Click on the button named 'Click!'.
What is the expected result?
File open dialog should open up. The above code works with firefox and IE
What happens instead?
Nothing has happened.
Please provide any additional information below. Attach a screenshot if
possible.
UserAgentString: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML,
like Gecko) Chrome/18.0.1025.162 Safari/535.19
Attachments:
file.html 432 bytes