3.2.0

Please anybody! Help.

This is driving me nuts!
If I paste the code inside <p> tag or <span> everything works like a charm!
When I paste it within <table> or <form> nothing would show up.
Can anybody shed some light on it?
Thanks in advance.

Evgeni
April 15,
Try this:

<html>
<head>
<title>ActiveWidgets Grid :: Examples</title>
<style> body, html {margin:0px; padding: 0px; overflow: hidden;} </style>

<!-- ActiveWidgets stylesheet and scripts -->
<link href="../../runtime/styles/xp/grid.css" rel="stylesheet" type="text/css" ></link>
<script src="../../runtime/lib/grid.js"></script>

<!-- grid format -->
<style>
var obj = new Active.Controls.Grid;

.active-grid-column {background-color: 999999;}
.active-grid-row {background-color: 999999;}
.active-column-0 {width: 150px;}
.active-column-1 {width: 150px;}
.active-column-2 {width: 80px; text-align: left;}
.active-column-3 {width: 90px;}
.active-column-4 {width: 80px;}
.active-column-5 {width: 80px;}
.active-column-6 {width: 80px;}
.active-column-7 {width: 80px;}

</style>
</head>
<body>
<table width="80%" height="393" border="0" cellpadding="2" cellspacing="1">
<tr>
<td height="374" align="left" valign="top"><form name="form1" method="post" action="">
<script>

// create ActiveWidgets data model - text-based table
var table = new Active.Text.Table;

// provide data URL - plain text comma-separated file
table.setURL("../data/list.txt");

// start asyncronous data retrieval
table.request();

// define column labels
var columns = ["Nama", "Gelaran Jawatan", "Gred Jawatan", "Negeri", "Status Permohonan", "Keputusan","Kelulusan"];

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

// provide column labels
obj.setColumnProperty("texts", columns);
var alternate = function(){
return this.getProperty("row/order") % 2 ? "e3e3e3" : "f3f3f3";
}

var row = new Active.Templates.Row;
row.setStyle("background", alternate);
obj.setTemplate("row", row);

// provide external model as a grid data source
obj.setDataModel(table);

// write grid html to the page
document.write(obj);

</script>
</form></td>
</tr>
</table>
</body>
</html>
jAB
April 22,
<html>
<head>
<title>sharma</title>
</head>
<body>
<table width="200" height="200">
<tr>
<td>
</td>
</tr>
</body>
</html>
gulshan sharma
October 5,

This topic is archived.

See also:


Back to support forum