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>');
}
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,