for (var i = 0; i < Channel.Rows.length; ++i)
{
ChannelList.options[ChannelList.options.length] = new Option(Channel.Rows[i].Caption, Channel.Rows[i].Value);
}
}
var AMList = document.getElementById("lstAM");
var txt = document.getElementById("txtValue");
function LoadAM(lstChannel)
{
var Id = lstChannel.options[lstChannel.selectedIndex].value;
txt.value = Id;
if (Id !="")
{
BASQuery.GetAM(Id, LoadAM_CallBack);
}
else
{
AMList.options.length = 0;
AMList.options[AMList.options.length] = new Option("全部", "");
CounterList.options.length = 0;
CounterList.options[CounterList.options.length] = new Option("全部", "");
}
}
function LoadAM_CallBack(response)
{
if (response.error != null)
{
alert(response.error);
return;
}
var AM = response.value;
if (AM == null || typeof(AM) != "object")
{
return;
}
for (var i = 0; i < Counter.Rows.length; ++i)
{
CounterList.options[CounterList.options.length] = new Option(Counter.Rows[i].Caption, Counter.Rows[i].Value);
}
}
function LoadSetValue( lst )
{
var Id = lst.options[lst.selectedIndex].value;
txt.value = Id;
}
</script>
</form>
</body>
</HTML>