Jump to content

dave.robertson

Members
  • Posts

    2
  • Joined

  • Last visited

dave.robertson's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thanks for the quick reply,This looks just the ticket, I have tried a quick test and it is just what I was looking for.Thanks again.
  2. Hello Everyone,I think I am missing a trick with HTML checkboxes and tables and I hope someone out there can put me on the right track.I am writing a simple HTA application that will query MS Active Directory for all users who have not logged on for a given period of time, and will return their name and last logon date to an HTML table, hence the post to this forum.I have written the code for that and all is well with the world.My problem is that I would like to include a checkbox in each resulting table row, allowing the row (user) to be 'selected'. Again I can add in the checkbox easily enough, but here comes the rub.Each checkbox will have an onclick="DoSomething" that will fire a sub routine to add/remove the user from an array/dictionary (haven't decided that bit yet), so my problem is, how can I give each checkbox a unique ID/Name, as the table is built dynamically and the contents will vary, and be able to check which row(s) have been selected?The script below is shows the sort of thing I am trying to achieve, and builds a simple table from a csv.txt file using an MS office control (I am using this as a proof of concept before stitching it into the main code). <html><head><script language=vbscript>sub GetInfo' Add user to dictionary or somethingend sub</script> </head><BODY><!-- Use MS Office Control to build table from CSV text file for testing--><OBJECT id="TableList" CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"> <PARAM NAME="DataURL" VALUE="d:\development\lastlogon\UserList.csv"> <PARAM NAME="UseHeader" VALUE="True"> <PARAM NAME="TextQualifier" VALUE=","></OBJECT><H2>Last Logon Report Test App</H2><table border='1' width='100%' cellspacing='0' datasrc=#TableList><THEAD><TR><td style="width: 55px">Select</td><TD>Name</TD><TD>Created</TD><TD>Last Logon</TD></TR></THEAD><TBODY><TR><!-- Need to figure out how to dynamically name this check box--><TD style="width: 55px"><input type="checkbox" onclick="getinfo" id="chk1"}/></TD><TD><B><DIV datafld="Name"></DIV></B></TD><TD><DIV datafld="Created"></DIV></TD><TD><DIV datafld="Last Logon"></DIV></TD></TR></TBODY></TABLE></BODY> I hope someone out there can help, as this was supposed to be the easy bit that I left till last.-RedRobbo-
×
×
  • Create New...