Creating a new Element via JavaScript
Posted: Thu Jan 05, 2012 9:28 am
We are trying to add a button to a ProfoundUI screen (that is not running under Genie) via JavaScript. We were able to do this when the screen was running under Genie by using the following code:
As newElement is Genie API, we have had to modify our code.
I have tried the following code, but the button does not display:
Any suggestions on how to create a new Element in ProfoudUI?
Code: Select all
var newButton = newElement(12, 1, "input", "Trans. History");
newButton.id = 'btnTransHistory';
var newButton = getObj('btnTransHistory');
addEvent(newButton, "click", function(){
riskTransactionHistory();
});
I have tried the following code, but the button does not display:
Code: Select all
var newButton = createNamedElement("button", "TransHistoryButton");
applyProperty(newButton,"id",'btnTransHistory');
applyProperty(newButton,"value",Trans. History');
applyProperty(newButton,"left",10);
applyProperty(newButton,"top",300);
newButton.onclick = function(){
riskTransactionHistory();
};