Implement javascript SelectFileDialog