Control a checkbox from another checkbox


I would like to use ActiveWidgets within my ASP.NET pages. In order for my code-behind function to see the object, I've tried to create a regular checkbox and hide it, and then use an AW check box to control this hidden checkbox. I have tried very hard to make this work but failed. Please help. The following codes are what I have in mind:
<input type="checkbox" id="Cbx1" name="chxAutoAltitude" runat="server" visible="true" />
<span id="Cbx2" ></span>
<script type="text/javascript" language="javascript">
    var checkbox = new AW.UI.Checkbox;
    checkbox.setControlText("My checkbox");
    // or this ?  checkbox.setEvent('onclick', function(){var cb = document.getElementById("Cbx1");cb.checked = this.checked;})
    checkbox.onControlValueChanged = function(){ var cb = document.getElementById("Cbx1");  if(this.checked) cb.checked = true;   else  cb.checked = false; }
November 1,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.