:: Forum >> Version 1 >>
Grid and float left problem
More information on this topic is available in the documentation section:
/active.howto.scroll/.
Bill Smith
Tuesday, August 30, 2005
When you start a DIV, then try and to JavaScript in the middle of it, things get out of whack. Or at best are not predictable. I suggest that you create the DIV's and set all their properties, including ID's. Then after the divs have closed, do the JavaScript and place the output into the div. So your code will look like this:
<body>
<div id="mywidget">
<div id="mytree">
</div>
<div id="mylist">
</div>
</div>
<script>
// create ActiveWidgets Grid javascript object
var obj = new Active.Controls.Grid;
// set number of rows/columns
obj.setRowProperty("count", 20);
obj.setColumnProperty("count", 5);
// provide cells and headers text
obj.setDataProperty("text", function(i, j){return myData[i][j]});
obj.setColumnProperty("text", function(i){return myColumns[i]});
// set headers width/height
//obj.setRowHeaderWidth("28px");
obj.setColumnHeaderHeight("20px");
// set click action handler
obj.setAction("click", function(src){window.status = src.getItemProperty("text")});
// write grid html to the page
document.getElementById("mylist").innerHTML = obj;
</script>
</body>
don't know if this will solve your problem but it might help.
Jim Hunter
Tuesday, August 30, 2005
Floating divs will make your your page looks like a pinball game in firefox. The rendering in Firefox is done on many ocasions and this is visilble for the user. It looks like all element are starting at the top and moved to their final position (looks like flashing).
Wednesday, August 31, 2005
I tried adding the the table after the closing body tag as described above. Same result. I'm going to give using a table a try.
Bill Smith
Wednesday, August 31, 2005
Bill Smith
Wednesday, August 31, 2005
Bill,
grid does not work in your examples because you are using strict DOCTYPE. The current version works in quirks more only (version 2.0 will support strict).
Alex (ActiveWidgets)
Wednesday, August 31, 2005
Thanks Alex. That fixed it.
Bill Smith
Wednesday, August 31, 2005
This topic is archived.
Back to /active.howto.scroll/
Documentation:
Forum search