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

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
brett.elston
Profound User
Posts: 62
Joined: Fri Nov 02, 2012 6:28 am
First Name: Brett
Last Name: Elston
Company Name: NAC
Phone: Lanseria
Address 1: Johannesburg
State / Province: Outside Canada/USA
Country: South Africa
Contact:

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

Post 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?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

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

Post 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.
brett.elston
Profound User
Posts: 62
Joined: Fri Nov 02, 2012 6:28 am
First Name: Brett
Last Name: Elston
Company Name: NAC
Phone: Lanseria
Address 1: Johannesburg
State / Province: Outside Canada/USA
Country: South Africa
Contact:

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

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests