Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread How to "click" a TFileUploadButton in code?
Mon, Oct 20 2014 6:04 AMPermanent Link

Walter Matte

Tactical Business Corporation

Is there a way to execute a TFileUploadButton click?

Walter
Mon, Oct 20 2014 6:40 AMPermanent Link

Uli Becker

Walter,

> Is there a way to execute a TFileUploadButton click?

Have a look at webctrls.wbs in the framwork. There is a protected
function "DoClick" of TFileUploadButton. Just move it to the public
declarations, restart the IDE and you can execute TFileUploadButton with

MyFileUploadButton.DoClick;

Uli
Mon, Oct 20 2014 6:40 AMPermanent Link

Walter Matte

Tactical Business Corporation

Thanks Uli
Mon, Oct 20 2014 7:11 AMPermanent Link

Walter Matte

Tactical Business Corporation

While the DoClick declaration is moved, and everything compiles, it does not work.  I call the DoClick method and the File Selection does not appear.

Any idea's?

Walter
Mon, Oct 20 2014 7:23 AMPermanent Link

Uli Becker

Walter,

> While the DoClick declaration is moved, and everything compiles, it does not work.  I call the DoClick method and the File Selection does not appear.

I tried it and it works here. Did you restart the IDE? That's necessary
because of caching.

Uli
Mon, Oct 20 2014 8:08 AMPermanent Link

Walter Matte

Tactical Business Corporation

Uli:

Not sure why, but it does not work in the IDE for me, but it works properly when deployed.

Thanks again.

Walter
Tue, Dec 9 2014 6:26 AMPermanent Link

Walter Matte

Tactical Business Corporation

Anyone seen this - or have a workaround?

Since I upgrading to EWB 1.04 - I modified the framework to move the TFileUploadButton DoClick to Public.

In code with v1.03 this works fine in all browsers ->   btnFileUpdate.DoClick - but in 1.04 - it works in Chrome, but does not work in IE.

Have you seen this or know a fix?

Walter
Tue, Dec 9 2014 6:45 AMPermanent Link

Matthew Jones

Walter Matte wrote:

> Since I upgrading to EWB 1.04 - I modified the framework to move the
> TFileUploadButton DoClick to Public.
>
> In code with v1.03 this works fine in all browsers ->
> btnFileUpdate.DoClick - but in 1.04 - it works in Chrome, but does
> not work in IE.
>
> Have you seen this or know a fix?

I haven't used this, but I guess you need to check out the source and
what it is doing. Does IE have a debugger?


--

Matthew Jones
Fri, Dec 12 2014 11:22 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Walter,

<< Since I upgrading to EWB 1.04 - I modified the framework to move the
TFileUploadButton DoClick to Public.

In code with v1.03 this works fine in all browsers ->
btnFileUpdate.DoClick - but in 1.04 - it works in Chrome, but does not work
in IE. >>

Did you make sure that your project is being compiled as an HTML5 project ?
You'll need that in order to have it work for IE9 or higher.  You can't do
what you want with IE8, due to how IE8 handles file upload elements.

Tim Young
Elevate Software
www.elevatesoft.com
Image