James
Fri Jun 24 10:26:04 CDT 2005
See if these links are helpful:
http://msdn.microsoft.com/workshop/author/om/doc_object.asp
http://webreference.com/dhtml/column5/
"MFelkins" <MFelkins@discussions.microsoft.com> wrote in message
news:AA73F42F-BD29-41B0-9D03-0A6C01BED3F0@microsoft.com...
> Thanks, that worked. Where oh where is this stuff documented??
>
> "James Whitlow" wrote:
>
> > Ok, I think I understand now. Without seeing your code, I had no idea
what
> > you were trying to do. I did read that you wanted to put it inside of a
> > cell, but I assumed (incorrectly) that the span was inside of a cell.
> >
> > I have two methods for you to consider. Either add a separate "id" to
the
> > input box:
> >
> > <td><b><input type="text" id='TestDate' name="fDate.value"</b>
> >
> > ...and then change your subroutine to something like this:
> >
> > Sub Window_Onload
> > fDate = Date
> > TestDate.innerText = fDate
> > End Sub
> >
> > ..or you could change the name to something without a period in it and
> > then reference it by name. Change the line to something like this:
> >
> > <td><b><input type="text" name="fDate_value"</b>
> >
> > ...and change your subroutine to something like this:
> >
> > Sub Window_Onload
> > fDate = Date
> > fdate_value.innerText = fDate
> > End Sub
> >
> > Also, since you are not using the "fdate" variable anywhere else in
the
> > sample you sent me, you don't actually have to assign the date to a
variable
> > and then pass it to the cell. You can change your subroutine and
eliminate a
> > line:
> >
> > Sub Window_Onload
> > fdate_value.innerText = Date
> > End Sub
> >
> > "MFelkins" <MFelkins@discussions.microsoft.com> wrote in message
> > news:49379E3C-8305-4722-9815-6F6943FBA632@microsoft.com...
> > > That works, but it does not put the date in the Table I am displaying
in
> > the
> > > <span>.
> > > It wipes out my table and puts the date in instead. What I want is for
the
> > > "Date of Test" field (cell) to be filled out automaticaly.
> > >
> > > Here is a version of my code;
> > >
> > >
> >
<----------------------------------/8---------------------------------------
> > ----->
> > >
> > > <html>
> > > <head>
> > > <meta name="GENERATOR" content="SAPIEN Technologies PrimalScript 3.1">
> > > <title>Data Mapper HTA</title>
> > > <HTA:APPLICATION
> > > APPLICATIONNAME="Production Readiness Checklist"
> > > SCROLL="yes"
> > > SINGLEINSTANCE="Yes"
> > > >
> > > <body STYLE="font:14 pt arial; color:white;
> > > filter:progid:DXImageTransform.Microsoft.Gradient
> > > (GradientType=1, StartColorStr='#000000', EndColorStr='#0000FF')">
> > > </head>
> > > <script language="VBScript">
> > >
> > > Sub Window_Onload
> > > fDate = Date
> > > 'DataArea.innerText = fDate
> > > End Sub
> > >
> > > Sub RunScript
> > > Set objFSO = CreateObject("Scripting.FileSystemObject")
> > > objFSO.CreateTextFile(fName.value & ".htm")
> > > Set objFile = objFSO.OpenTextFile(fName.value &".htm", 2)
> > > objFile.WriteLine DataArea.InnerHTML
> > > objFile.Close
> > >
> > > End Sub
> > >
> > > Sub ExitHTA
> > > self.close()
> > > End Sub
> > >
> > > </script>
> > > <body>
> > > <p>
> > > <span id = "DataArea">
> > > <table width="100%" rules= "all">
> > > <tr align="center" valign="top">
> > > <td><b>Item</td>
> > > <td><b>Value</td>
> > > <td><b>Verified (y/n)</td>
> > > </tr>
> > > <tr align="left" valign="top">
> > > <td><b>Server Name: </td>
> > > <td><INPUT type="text" Size=20 Name="fName"></td>
> > > <td><input type="text" size=5 name="fyes"</td>
> > > </tr>
> > > </tr>
> > > <tr align="left" valign="top">
> > > <td><b>CR: </td>
> > > <td><INPUT type="text" Size=20 Name="fCR"></td>
> > > <td><input type="text" size=5 name="fyes"</td>
> > > </tr>
> > > <tr align="left" valign="top">
> > > <td><b>Date of test</td>
> > > <td><b><input type="text" name="fDate.value"</b>
> > > <td><input type="text" size=5 name="fyes"</td>
> > > </tr>
> > >
> > > </table>
> > > </span>
> > > <input type="button" value="Submit" name="run_button"
onClick="RunScript">
> > > <input type="button" value="Exit" name="run_button1"
onClick="ExitHTA">
> > <p>
> > > <center><b>Click the "Submit" button to record your Server
> > > information.</center><br>
> > > <br><center>(Please click the button <strong>JUST ONE
> > > TIME</strong>)<br></b></center>
> > >
> > > </body>
> > > </html>
> > >
> > >
> >
<------------------------------------------/8-------------------------------
> > -------------->
> > >
> > > "James Whitlow" wrote:
> > >
> > > > "MFelkins" <MFelkins@discussions.microsoft.com> wrote in message
> > > > news:F3F2E046-3935-4471-B42A-A81219B7F509@microsoft.com...
> > > > > is ther a way to pass a veriable to the <span> area from a VB
script.
> > I
> > > > would
> > > > > like to pass todays date to a cell in a table.
> > > > >
> > > > > VBScript;
> > > > >
> > > > > Sub Window_Onload
> > > > > fDate = Date
> > > > > End Sub
> > > > >
> > > > > How do I display fDate in the <span>
> > > > >
> > > > > TIA
> > > > >
> > > > > Mike
> > > > >
> > > > >
> > > > > microsoft.public.scripting.vbscript
> > > >
> > > > Just give the span a name & set the innerText of the span to the
> > variable:
> > > >
> > > > <span id='myspan'>Hello</span>
> > > > <script language="VBScript">
> > > > Sub Window_Onload
> > > > fDate = Date
> > > > myspan.innerText = fDate
> > > > End Sub
> > > > </script>
> > > >
> > > >
> > > >
> >
> >
> >