simulating onclick event

Hi,
I need to simulate onClick() event. On my form I have a ‘file’ item type which is hidden and I need a way to make file open window to show and I think simulating onclick is the way. Something like this:

myForm.getItem("file").onClick()

Can something like this be done?
Thanks in advance.

hi

not all browsers will allow you to do it due security restrictions
you can try our uploader, but anyway user needs to click to show dialog