button behave abnormal.

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

button behave abnormal.

#1

Postby xren » Fri May 03, 2013 3:17 pm

Hi,

I have 4 buttons in a panel at the bottom a page.
"Add New Letter", "Cancel Add", "Save", "Delete"

When the form first load, I will check if a letter id passed by caller,
if not, then "Add New Letter" appears, all other buttons hide.
If yes, then "Add new Letter", "Save" and "Delete" appear, "Cancel Add" hide.

After click the "Add new letter", the "Add new letter" hide, and all other show.

But it works fine when call pass letter id.
When no letter id passed, the "Add new letter" showed, but after click it, no button shows up.
I found when I set "Add new letter" button to disabled, everything is fine with the "add new letter" shows but not enabled. But when I set this "add new letter" button hide(), then all button do not show up.

What is the problem?

Thanks for your help.

Xiaoli
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

#2

Postby Wai » Tue May 14, 2013 8:03 am

Hi Xiaoli,

Did you manage to solve this issue?

Do you have example of your scripts?
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#3

Postby xren » Wed May 15, 2013 2:51 pm

Hi Wai,


The following is the code of clicking "Add New Letter" button.

importPackage(com.ebasetech.xi.api);
importPackage(com.ebasetech.xi.services);


resources.REHAB_LETTER_SEQ.fetch();
fields.LETTER_TEMP_ID.value = fields.LETTER_SEQ.value;

log("new letter seq: " + fields.LETTER_SEQ.value);

fields.LETTER_BODY.value = "";
fields.LETTER_NAME.value = "";
fields.LETTER_DESCRIPTION.value = "";


controls.PANEL_LETTER_TEMP.show();


controls.SAVE_BTN.show();

controls.CANCEL_BTN.show();
controls.ADD_BTN.setDisplayOnly(true);
controls.ADD_BTN.hide();
0 x


Who is online

Users browsing this forum: No registered users and 18 guests