:: Forum >>

No DIV/TABLE Tags In Cell?


So, this may be obviously stated somewhere in the docs, but given:

obj.setHeaderText( "<span id=myInput3>" + myInput + myButton + "</span>", 3, 1);
obj.setHeaderText( "<div id=myInput3>" + myInput + myButton + "</div>", 3, 1);
obj.setHeaderText( "<table id=myInput3><tr><td>" + myInput + myButton + "</td></tr></table>", 3, 1);

Seems like <span> works, but <div> and <table> do not? Why?
Paul Tiseo
Friday, March 24, 2006
you need the div before span
Friday, March 24, 2006
Actually, I was trying to show three possible ways of "injecting" HTML into a cell. I would use one of the three at a time. <div> and <table> seem to prevent display of anything in a cell. Is this correct or did I overlook something?
Paul Tiseo
Monday, March 27, 2006
When you insert block element into the cell it is wrapped to the 'next line' out of the visible area. It happens because the standard cell templates (Text, Image, ImageText) have 'ruler' span before 'text' span, which is necessary for vertical alignment of the cell text.

There is also a 'simple' template (AW.Templates.Cell) which does not have extra elements, so using it with <div> or <table> should be ok.

Actually if you inject the html markup (instead of plain text) I would recommend using AW.Templates.Cell instead of default AW.Templates.Text cell template.
Alex (ActiveWidgets)
Monday, March 27, 2006
This post is an attempt for a newbie to AW to understand how to possibly solve the question I (badly? :)) asked in:

http://www.activewidgets.com/javascript.forum.13008.1/complex-html-form-in-a.html

I'm trying to understand the best way to have a second header row where I can add one or two input items and an "Apply" button. The template classes don't cut it, because they are setup for applying a single input type to a cell.

Is there a "best way"?

Thanks.
Paul Tiseo
Monday, March 27, 2006

This topic is archived.


Back to support forum

Forum search