I have the following HTA application. This is a small version of a larger one I'de like to use to wrap a bunch of VBscripts for AD, hardware, processes, etc. I want to be able to use checkboxes to expand areas of the HTA when I want to use those types of tools.
The expanding by a checkbox works but, the script causes an error. When I run this same script in an HTA that doesn't use a Javascript (for the expanding checkbox) it works fine.
Can anyone tell me what's wrong?
Thanks!
[!]The AutoSavers![/!]
Code:
<html>
<head>
<title>Useful Tools</title>
<HTA:APPLICATION
APPLICATIONNAME="Useful Tools"
SCROLL="no"
SINGLEINSTANCE="no"
WINDOWSTATE="normal"
VERSION="1.0"
/>
<script language="JScript">
function HidePart(d) { document.getElementById(d).style.display = "none"; }
function ShowPart(d) { document.getElementById(d).style.display = "block"; }
function CheckboxChecked(b,d)
{
if(b) { ShowPart(d); }
else { HidePart(d); }
}
</script>
<script language="VBScript">
Sub Window_onLoad
window.resizeTo 1024,900
End Sub
</script>
</head>
<body>
<h1>Useful Tools</h1>
<form>
<p>
<input type="checkbox" name="mycheckbox" value="yes" onclick="CheckboxChecked(this.checked,'checkboxdiv4')">
Check this box to see Process Tools.
</p>
<div id="checkboxdiv4" style="display:none">
<p>
<input type="button" value="Process Information" name="run_button" onClick="ProcessInfo"><p>
</p>
</div>
</form>
</body>
</html>
Can anyone tell me what's wrong?
Thanks!
[!]The AutoSavers![/!]