Page 1 of 1

Help with getObj("FileUpload1").fileUpload.clear();

Posted: Fri Aug 28, 2015 4:42 am
by brett.elston
Hi,

I have a situation where I file upload widget with two buttons, either accept upload or cancel upload, but in both circumstances return control to my program and then continue processing.

The problem I encountered is that if someone selects a file to upload in the widget, but doesn't clear the file out before returning control, the upload occurs automatically. I am therefore trying to use the getobj clear function to clear the list and then return press the relevant cancel button to return control.

At present my onclick script : - getObj("FUPREQDOCS").fileUpload.clear();
pui.click("ButRdlCnl");

When processing I get the error : - Onclick Error:
Object doesn't support property or method 'clear'
Please could you assist?

Re: Help with getObj("FileUpload1").fileUpload.clear();

Posted: Fri Aug 28, 2015 8:16 am
by Scott Klement
make sure "FUPREQDOCS" matches the id of your file upload widget exactly. (Upper/lowercase must match, and it must be the id property, not the name of bound field).

Also make sure you are on Profound UI 4.8.4 or newer.

Re: Help with getObj("FileUpload1").fileUpload.clear();

Posted: Fri Aug 28, 2015 8:20 am
by brett.elston
Hi Scott,

Thank you, we are on 4.7.2 so I guess that's the problem. I will upgrade on Monday and try again.

Enjoy your weekend.