Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Write info to a table in an HTA

10 views
Skip to first unread message

OldDog

unread,
Jul 9, 2007, 2:41:50 PM7/9/07
to
Hi,

I am trying to convert an ASP page to an HTA.

I would like to write out the results of a query to a table that
appears inside the HTA screen.
How do I get my results to show up in the table?

Here is my query

'go through each event entry
For Each oRecord In oResultset
'Format the date and time of the entry
dtDate = CDateWMI(oRecord.TimeGenerated)
dtTime = CTimeWMI(oRecord.TimeGenerated)
rNum = oRecord.RecordNumber
rType = oRecord.Type
rSource = oRecord.SourceName
rCat = oRecord.Category
rCatString = oRecord.CategoryString
rEventCode = oRecord.EventCode
rUser = oRecord.User
rCompName = oRecord.ComputerName
rMessage = oRecord.Message
Next

Here is the HTML code to build my table;

<!-- 'build table header -->
<TABLE cellspacing=0 cellpadding=3 border=1>

<!-- 'build first table row -->
<TR>
<TH>Record</TH>
<TH>Type</TH>
<TH>Date</TH>
<TH>Time</TH>
<TH>Source</TH>
<TH>Category</TH>
<TH>Cat Strg</TH>
<TH>Event</TH>
<TH>Usr</TH>
<TH>Computer</TH>
<TH>Msg</TH>
</TR>
<!-- 'write row tag -->
<TR>
<!-- 'write cell tag & record information -->
<TD> rNum </TD> <!------ How do I get rNum to write out the value
from the Query? --->
<TD> rType </TD>
<TD> dtDate </TD>
<TD> dtTime </TD>
<TD> rSource </TD>
<TD> rCat </TD>
<TD> rCatString </TD>
<TD> rEventCode </TD>
<TD> rUser </TD>
<TD> rCompName </TD>
<TD> rMessage </TD></TR>

<!-- 'close the table -->
</TABLE> </FONT>

S Moran

unread,
Jul 9, 2007, 3:52:54 PM7/9/07
to
build your entire html string in the loop. then when its all done set the
innerHTML property of a div tag to your string.

For Each something In somethingelse
strHTML = strHTML & someproperty
Next

MyDIV.innerHTML = strHTML

<div id="MyDIV"></div>


"OldDog" <michael....@wellsfargo.com> wrote in message
news:1184006510.5...@q75g2000hsh.googlegroups.com...

0 new messages