3.2.0

write to div

Hello
I am afraid this is a newbie question, however all the examples I have seen are just the raw document.write(obj). How do I get the output "into" a div or a cell in a table? Thank you.
cpanon@yahoo.com
May 1,
document.getElementById("id").innerHTML = obj;
Alex (ActiveWidgets)
May 3,
Thank you. Elegant. Can you explain how that works? What is the function that AW is receiving to "display itself". Something very elegant is going on with that method call and assignment.

Can I ask another off topic? I know how "uncouth" that is, but here goes. As my newbie status demonstrated, I just want to use the same style that you use in the xp style sheet for all of the text boxes and elements on the page. I am generating this page with Tomcat/Struts so I have the ability to assign a style, I just cant figure out what the style would be for text, and html elements. I know this is CSS obtusness, but is you can help, I would appreciative for the edification.
cpanon@yahoo.com
May 3,
This will explain your first question http://www.activewidgets.com/lib.html/ So it used the default toString() method to generate its code. You can also write more standard code to achieve the same result. I.e. -
<div>
<script>
AW code here
</script>
</div>

As to your second question, if I understand you correctly, the AW css is tied to AW object classes. To use the AW css with other HTML elements, you'd need to give them the same AW class. But I don't think that would work too well. It would probably be better to define your own, similar ones.
Anthony
May 4,

This topic is archived.

See also:


Back to support forum