3.2.0

Updating AW.HTML.DIV content via a Button

Alex,

I am attempting to update the following div but what I get when I click on the button is white screen and my div content. I guess the screen is being overwritten with white. All I want is for the div region i defined to be updated.

what am I missing?



var RecentTest = new AW.HTML.DIV;
RecentTest.setId("RecentTest");
RecentTest.setPosition(652, 41);
RecentTest.setSize(184, 30);
RecentTest.setAttribute("readonly", "true");
RecentTest.setStyle("font-size", "8pt");
RecentTest.setStyle("font-family", "Tahoma");
RecentTest.setStyle("background-color", "Moccasin");
RecentTest.setContent("html",'Herd ID: xxxxxx<br>TestDate: Mon dd yyyy<br>CC xx<br>');

document.write(RecentTest);

...

var mdbuttondelmed = new AW.UI.Button;
mdbuttondelmed.setId("mdbuttondelmed");
mdbuttondelmed.setControlText("Get Test Score");
document.write(mdbuttondelmed);


mdbuttondelmed.onClick = function(){
// label.setControlText("Changing Recent Test data...");
RecentTest.setContent("html",'Herd ID: xxxxxx<br>TestDate: Mon dd yyyy<br>Updated<br>');
}
Jeff
September 25,
refresh() is missing, otherwise works ok for me -

mdbuttondelmed.onClick = function(){
RecentTest.setContent("html",'Herd ID: xxxxxx<br>TestDate: Mon dd yyyy<br>Updated<br>');
RecentTest.refresh();
}
Alex (ActiveWidgets)
September 26,
Working to late last night.

It was obvious when I looked at it this morning.

Thanks Alex.
Jeff
September 26,

This topic is archived.

See also:


Back to support forum