PDA

View Full Version : Canvas section - web



paudiewalsh
2020-01-03, 14:03
Hi
I have a canvas section with 2 text boxes. Data is entered into field1. I use field1 change event.
I want field2 to display field1 value , this works ok.
Then I want to reset field1 to blank so I can enter the next value.
The code runs fine when I run the form from Desktop. When run from web the field1 value does not get reset to blank. I added a line to change section caption just for testing.
Same result - caption changes when run from desktop , nothing happens when run from web.
Any advice will be most appreciated.


function page1_section1_field1_changed()
{
var jsection=Lianja.getElementByID("page1.section1");
var mtext=Lianja.getElementByID("page1.section1.field1");
mdata=mtext.text;
var mlastscan=Lianja.getElementByID("page1.section1.field2");
mlastscan.text = mdata;
//Works ok on desktop & web
mtext.text = "";
jsection.caption=mdata;
jsection.refresh();
//desktop - field1 is reset to blank, section caption is set to mdata
//web&phone -field1 value is not reset, section caption is not set to mdata
};

barrymavin
2020-01-03, 19:43
Hi Paudie,

You donít say whether you have data bound this section.

Try removing the refresh for this use case.