Hi All,
I have an HTA (writen in VBScript (yes I know - bare with me)) that spawns a popup using showModalDialog. The onload function of the child window dynamically builds a list of all Active Directroy Security groups in our domain.
The dynamic table has check boxes. There is a button (calling a js function) that should select all the security groups in the table. I pinched the code from a different project that used IFRAME's rather than dialogs (that worked).
The error I get is: "Line 3: Object required: 'this'"
I just can't see why it is giving this error.
Here is (most) of the code from the child page sgPage.hta:
If it's any help, the line of code in VBScript that creates the checkbox in the table is:
It's not referencing the parent window, so assuming there would be a problem if it were, there shouldn't be here.
I am stumpted as to why it cannot see the form.
Any help, pointer would be greatly apreciated.
Many thanks,
Woter,
P.S. I am no JavaScript expert.
I have an HTA (writen in VBScript (yes I know - bare with me)) that spawns a popup using showModalDialog. The onload function of the child window dynamically builds a list of all Active Directroy Security groups in our domain.
The dynamic table has check boxes. There is a button (calling a js function) that should select all the security groups in the table. I pinched the code from a different project that used IFRAME's rather than dialogs (that worked).
The error I get is: "Line 3: Object required: 'this'"
I just can't see why it is giving this error.
Here is (most) of the code from the child page sgPage.hta:
Code:
<form id="sgForm" name="sgForm">
<input type="button" id="idBtn" value="OK" onclick="CloseWindow()">
<input id="BtnChkAll" type="button" value="Check All" onclick="CheckAll this.Form,'chkctrl',true" style="witdth:115px">
<DIV ID="oTableContainer"></DIV>
<input type="button" id="idBtn" value="OK" onclick="CloseWindow(sgForm.form)">
<table id="sgTable"></table>
</form>
<script language="javascript" >
function CheckAll(theForm,CheckName,State){
elemArray=theForm.elements[CheckName];
for (i=0;i<elemArray.length;i++){
elemArray[i].checked=state;
}
}
</script>
If it's any help, the line of code in VBScript that creates the checkbox in the table is:
Code:
oTBody0.appendChild(oRow)
'Column 1 - Select
Set oCell = document.createElement("<TD CLASS='cSelect'>")
oCell.innerhtml = "<input type=""checkbox"" id=""chkCtrl"" name=""chkCtrl"" value"""+group+""">"
oRow.appendChild(oCell)
It's not referencing the parent window, so assuming there would be a problem if it were, there shouldn't be here.
I am stumpted as to why it cannot see the form.
Any help, pointer would be greatly apreciated.
Many thanks,
Woter,
P.S. I am no JavaScript expert.