Hello,
I need to fill an hta table with some data from an array. I found a sample html code that does something similar to what I need. However, the script language is javascript.
How can I convert the javascript to vbscript? The code is listed below:
<HTML>
</head>
<TITLE>Fill Table</TITLE>
<HTA:APPLICATION ID="Tablesample"
APPLICATIONNAME="Tablesample"
BORDER="thick"
BORDERSTYLE="normal"
CAPTION="yes"
ICON="myicon.ico"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="no"
SYSMENU="yes"
VERSION="2.0"
WINDOWSTATE="normal">
<body>
<SCRIPT type="text/javascript">
function numberCells()
{
var count=1;
var oTable = document.getElementById('oTable');
var RowsLength = oTable.rows.length;
for (var i=0; i < RowsLength; i++)
{
var oCells = oTable.rows.item(i).cells;
var CellsLength = oCells.length;
for (var j=0; j < CellsLength; j++)
{
oCells.item(j).innerHTML = count++;
}
}
}
</SCRIPT>
<BODY onload="numberCells()">
<TABLE id=oTable border=1>
<TR><TH> </TH><TH> </TH><TH> </TH><TH> </TH></TR>
<TR><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR>
<TR><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR>
</TABLE>
</BODY>
</HTML>
Any help or direction will be greatly appreciated.
I need to fill an hta table with some data from an array. I found a sample html code that does something similar to what I need. However, the script language is javascript.
How can I convert the javascript to vbscript? The code is listed below:
<HTML>
</head>
<TITLE>Fill Table</TITLE>
<HTA:APPLICATION ID="Tablesample"
APPLICATIONNAME="Tablesample"
BORDER="thick"
BORDERSTYLE="normal"
CAPTION="yes"
ICON="myicon.ico"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="no"
SYSMENU="yes"
VERSION="2.0"
WINDOWSTATE="normal">
<body>
<SCRIPT type="text/javascript">
function numberCells()
{
var count=1;
var oTable = document.getElementById('oTable');
var RowsLength = oTable.rows.length;
for (var i=0; i < RowsLength; i++)
{
var oCells = oTable.rows.item(i).cells;
var CellsLength = oCells.length;
for (var j=0; j < CellsLength; j++)
{
oCells.item(j).innerHTML = count++;
}
}
}
</SCRIPT>
<BODY onload="numberCells()">
<TABLE id=oTable border=1>
<TR><TH> </TH><TH> </TH><TH> </TH><TH> </TH></TR>
<TR><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR>
<TR><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR>
</TABLE>
</BODY>
</HTML>
Any help or direction will be greatly appreciated.