Hi all,
I have a simple script (part of HTA file) as follows:
The problem is at strLogLoc:Code:Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder("\\" & strComputerName & "\c$\Windows\System32\CCM\Logs") Set colSubfolders = objFolder.Files For Each objSubfolder in colSubfolders strLogLoc = "\\" & strComputerName & "\c$\Windows\System32\CCM\Logs" & objSubfolder.Name strHtm = strHtm & "<tr onmouseover=""this.className='tblhover'"" onmouseout=""this.className='tblnorm'""><td width=""500""> " & objSubfolder.Name & "<td>" & fnmemory(objSubfolder.Size) & "</td><td><a href=""#"" onclick=OpenLog(strLogLoc)>test</a></td><td>" & strLogLoc & "</td></tr>" Next Sub OpenLog(strLogLoc) msgbox("OpenLog has been reached with value " & strlogloc) End Sub
- the OnClick event generates a "Variable undefined" error
- simply outputting the variable shows a full concatened path in the exact way I would want to see it
If I replace...
withCode:onclick=OpenLog(strLogLoc)
...then the OpenLog sub is entered and performed nicely (including the passed on variable).Code:onclick=OpenLog(""Woopsie"")
I have no idea what I'm doing wrong and I would really like this to work!
Many many thanks in advance!
Regards




Reply With Quote