I have been trying to add an OU selection during my deployement in my HTA and JS files, But I cant seem to get the variable MachineObjectOU to get passed along. It keeps placing everything in the Computers OU... The code in question is below:
How do I write the correct javascript to pass the value?? I have MacineObejectOU = document.getElementById('MachineObjectOU').checked
That does not work though, anyone have suggestions?
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
I have been trying to add an OU selection during my deployement in my HTA and JS files, But I cant seem to get the variable MachineObjectOU to get passed along. It keeps placing everything in the Computers OU... The code in question is below:
How do I write the correct javascript to pass the value?? I have MacineObejectOU = document.getElementById('MachineObjectOU').checked
That does not work though, anyone have suggestions?
<p><Select id=JoinDomain name=JoinDomain language=vbscript onchange="myfunction()" onpropertychange=ValidateDomainMembership accesskey=a> <option>Select Domain</option> <option value="Administrative">Administrative</option> <option value="Developement">Developement</option> <option value="External">External</option> <option value="IT">IT</option> <option value="Restricted">Restricted</option> <option value="Sales">Sales</option> <option value="Service Computers">Service Computers</option> <label class=ErrMsg for=JoinDomain>* Required</label> </p> </td> </tr> <script type="text/javascript"> function myFunction() { alert(JoinDomain.value); switch(JoinDomain.value) { case "Administrative": MachineObjectOU.value="OU=Administrative,OU=Workstations,DC=online,DC=com"; break; case "Developement": MachineObjectOU.value="OU=Developement,OU=Workstations,DC=online,DC=com"; break; case "External": MachineObjectOU.value="OU=External,OU=Workstations,DC=online,DC=com"; break; case "IT": MachineObjectOU.value="OU=IT,OU=Workstations,DC=online,DC=com"; break; case "Restricted": MachineObjectOU.value="OU=Restricted,OU=Workstations,DC=online,DC=com"; break; case "Sales": MachineObjectOU.value="OU=Sales,OU=Workstations,DC=online,DC=com"; break; case "Service Computers": MachineObjectOU.value="OU=Service Computers,OU=Workstations,DC=online,DC=com"; break; } } </script> <tr> <td colspan=2></td> <td> </td> <td id=PopupParent> <input type=text id=MachineObjectOU name=MachineObjectOU size=60 language=vbscript onpropertychange=ValidateDomainMembership accesskey=O> <input type="button" id=MachineObjectOUOptionalBtn hidefocus="1" value="▼" style="height:23; width:16; font-family: helvetica; font-size: 7pt; display: none;" onclick="JavaScript:HideUnHideComboBox();"> <div id="PopupBox" style="position:absolute; display:none; z-index:10000; width: 240px; left: 250px;" > <select size="6" id="MachineObjectOUOptional" style="width: 100%; border-style: none" onchange="JavaScript:MachineObjectOU.value = this.value;" onclick="javascript:HideUnHideComboBox();"> </select>Share this post
Link to post
Share on other sites