I have a situation in which I can use javascript, but constrained to building easyui elements by adding to a dom object and later passing it to another easyui element like this: