From 7036c5e7a62f37e620f2113c20b4331b4e650e58 Mon Sep 17 00:00:00 2001 From: bluesaxman Date: Thu, 17 Jun 2021 15:35:38 -0600 Subject: [PATCH] Added return to addButton so you can get its element --- libs/bluecore.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/bluecore.js b/libs/bluecore.js index f5e688c..3453f9b 100644 --- a/libs/bluecore.js +++ b/libs/bluecore.js @@ -99,10 +99,12 @@ function numberShorten (Value) { function buttonAdd (ParentID,ID,Label,Action,Class,Element) { if ( "undefined" == typeof Class ) { Class = ""; } if ( "undefined" == typeof Element) { Element = "div"; } - (function (button) { + var me = (function (button) { button.innerHTML = Label; button.onclick = function () { Action(); } + return button; })(elementPlace(ParentID,ID,"button "+Class,Element)); + return me; } function inputDialog (dialogRoot,container,args,callback) {