:: Forum >>

TD Problem

I am having an issue with this code from IE version 6.0.2800.1106.xpsp2.030422-1633 (6.0 + SP + Hotfixes)

--------------------------------------------------

<HTML>
<head>
<title>TD Problem</title>

<!-- ActiveWidgets stylesheet and scripts -->
<link href="runtime/classic/activeui.css" rel="stylesheet" type="text/css" ></link>
<script src="runtime/activeui.js"></script>

<!-- grid format -->
<style>
.active-controls-grid {height: 100%; font: menu;}

.active-column-0 {text-align: left; width: 120px;}
.active-column-1 {text-align: left; width: 125px;}
.active-column-2 {text-align: left; width: 125px;}
.active-column-3 {text-align: left; width: 350px; background-color: threedlightshadow;}
.active-column-4 {text-align: left; width: 60px;}
.active-column-5 {text-align: left; width: 60px;}

.active-templates-row {border-bottom: 1px solid threedlightshadow;}
.active-row-cell {border-right: 1px solid threedshadow;}
</style>

</head>
<BODY>

<table>
<tr>
<td>

<script>

var myData = [
["11/12/2003 06:20:01", "XXX.30.181.XXX", "XXX.40.164.XXX", "SCAN nmap TCP", "1", "3"],
["11/12/2003 04:57:59", "XXX.40.164.XXX", "XXX.194.6.XXX", "WEB-MISC 403 Forbidden", "3", "1"],
["11/12/2003 04:52:00", "XXX.40.164.XXX", "XXX.150.213.XXX", "WEB-MISC 403 Forbidden", "3", "6"],
["11/12/2003 04:49:01", "XXX.163.252.XXX", "XXX.40.164.XXX", "WEB-MISC http directory traversal", "3", "8"],
["11/12/2003 04:49:01", "XXX.240.205.XXX", "XXX.40.164.XXX", "WEB-CGI formmail access", "3", "1"],
["11/12/2003 04:49:01", "XXX.163.253.XXX", "XXX.40.164.XXX", "WEB-MISC http directory traversal", "3", "2"],
["11/12/2003 00:27:59", "XXX.74.60.XXX", "XXX.40.164.XXX", "WEB-CGI rsh access", "3", "2"]
];


var myColumns = [
"Message Date & Time", "Source", "Target/Facility", "Message", "Priority", "Count"
];

// create ActiveWidgets Grid javascript object
var obj = new Active.Controls.Grid;

// set number of rows/columns
obj.setRowCount(7);
obj.setColumnCount(6);

// provide cells and headers text
obj.setDataText(function(i, j){return myData[i][j]});
obj.setColumnText(function(i){return myColumns[i]});

// set headers width/height
obj.setRowHeaderWidth("0px");
obj.setColumnHeaderHeight("20px");

// set click action handler
obj.setAction("click", function(src){window.status = src.getProperty("item/text")});

// write grid html to the page

document.write(obj);

</script>

</td>
</tr>
</table>
</body>
</HTML>

---------------------------------------------------

It works fine for Mozilla Firebird 0.6.1

What am I doing wrong? Any help is greatly appreciated!
Wednesday, November 12, 2003
Looks like everything is OK but the grid itself is not visible - probably because the table width and height are zero. If you modify the layout to something like
...
<table style="width:100%; height: 100%">
...
it should work again.
Alex (ActiveWidgets)
Wednesday, November 12, 2003
Worked like a champ!

This might make a good note for the documentation! Spent a few hours pulling my hair out...

Thanks for your prompt response. You are doing excellent work.
Wednesday, November 12, 2003

This topic is archived.


Back to support forum

Forum search