Atozed Forums
TIWFileUploader - Printable Version

+- Atozed Forums (
+-- Forum: Atozed Software Products (
+--- Forum: IntraWeb (
+---- Forum: English (
+----- Forum: IntraWeb General Discussion (
+----- Thread: TIWFileUploader (/thread-313.html)

TIWFileUploader - Mikey29 - 06-01-2018


I would like to simulate a mouse clic event on a TIWFileUploade component…

I should use the OnAsyncClick… :

IWFileUploader1.OnAsyncClick(IWFileUploader1, EventsParams);

For the sender I use the IWFileUploader1 name of the component, But for the EventsParams, I Don't know what to use …
If place a Stringlist I've created It return me an error…

It is possible to simulate a mouse clic for this compents ? If yes, where I can found a sample, Please ?

With Best regards,

RE: TIWFileUploader - Jose Nilton Pace - 06-01-2018

Hi Mikey, you can do:

RE: TIWFileUploader - Mikey29 - 06-01-2018

Hello JNP,

Whoa !
I will test it on Monday…

Big thank you !
Have a nice Week-end.
With best Regards,

RE: TIWFileUploader - Mikey29 - 06-04-2018

Hello JNP,

I've tested :


But this doesn't simulate the clic on the IWFileUploader1 component…

With best Regards

RE: TIWFileUploader - Ian_F1 - 02-26-2019

In my experience "IWFileUploader1.selectFile;" only works on IE not on Chrome. In my search for a solution I've come across this....

Quote:Use this JavaScript on IWButton's ScriptEvents property (onclick event):


Where IWFILEUPLOADER1 is the name of your IWFileUploader component.

but I can't get that to work either Confused

RE: TIWFileUploader - kudzu - 02-26-2019

This is a JavaScript issue. JS is a horrible language and this particular part has caused me a LOT of bugs in 17 which often take a long time to track down.

In Delphi these are the same:

In JS they are NOT, yet both are valid syntax. In JS these are BOTH valid, but are DIFFERENT:

Use this one. It calls the method.

This one does NOT call the method. It instead returns the method "pointer". But since its not being assigned, JS just retrieves the "pointer" and then immediately discards it.

RE: TIWFileUploader - Ian_F1 - 02-27-2019

Hi kudzu,

Many thanks for your answer but I'm afraid that didn't help. Incidentally that selectFile method works fine in IE both with and without the brackets but neither variant works in Chrome. I'm using intraweb 14.2.9, perhaps that's relevant?

Thanks for your help.

RE: TIWFileUploader - kudzu - 02-27-2019

IE is totally non standard. What it does or not is never a good bar to use. I dont think this has to do with IW version. Off the top of my head selectFile is a JS built in function not anything provided by IW.

I will ask Alexandre to take a look at this thread, but just as something I saw in searching try .click() instead of selectFile(). I didnt dig into it or test this, just based on some threads I saw on other forums.

RE: TIWFileUploader - Jose Nilton Pace - 02-27-2019

Hi guys. I have a TIWFileUploader with ButtonVisible := False; and a TIWButton with in ScriptEvents[onClick] this code: IW.FileUploader("IWFILEUPLOADER").selectFile();