D
David R
Here's the relevant XHTML:
-------------------------------------------------------------------------------------
<dl>
<dt>Add...</dt>
<dd><label for="radSection" ><input type="radio" id="radSection"
runat="server" value="1" /> Section</label>
<label for="radCategory"><input type="radio" id="radCategory" runat="server"
value="2" /> Category</label></dd>
<dt><label for="selSections">Add to</label></dt>
<dd><select id="selSections" runat="server" /></dd>
<dt><label for="txtName">Name</label></dt>
<dd><input type="text" runat="server" id="txtName" /></dd>
<dt><label for="selDefaultArticle">Default Article</label></dt>
<dd><select id="selDefaultArticle" runat="server" /></dd>
</dl>
<div>
<button id="btnAdd">Add</button>
</div>
<script src="../scripts/Categories.js" type="text/javascript"></script>
-------------------------------------------------------------------------------------
And here's the script:
-------------------------------------------------------------------------------------
var radSection;
var radCategory;
var selSections;
var btnAdd;
document.onload = function() {
radSection = document.getElementById("radSection");
radCategory = document.getElementById("radCategory");
selSections = document.getElementById("selSections");
btnAdd = document.getElementById("btnAdd");
radSection.onclick = function() {
selSections.Enabled = false;
btnAdd.innerHTML = "Add Section";
}
radCategory.onclick = function() {
selSections.Enabled = true;
btnAdd.innerHTML = "Add Category";
}
}
var radSection;
var radCategory;
var selSections;
var btnAdd;
document.onload = function() {
radSection = document.getElementById("radSection");
radCategory = document.getElementById("radCategory");
selSections = document.getElementById("selSections");
btnAdd = document.getElementById("btnAdd");
radSection.onclick = function() {
selSections.Enabled = false;
btnAdd.innerHTML = "Add Section";
}
radCategory.onclick = function() {
selSections.Enabled = true;
btnAdd.innerHTML = "Add Category";
}
}
-------------------------------------------------------------------------------------
Firefox nor IE report any script errors, yet I can't see why it isn't
working. Any ideas?
Thanks
-------------------------------------------------------------------------------------
<dl>
<dt>Add...</dt>
<dd><label for="radSection" ><input type="radio" id="radSection"
runat="server" value="1" /> Section</label>
<label for="radCategory"><input type="radio" id="radCategory" runat="server"
value="2" /> Category</label></dd>
<dt><label for="selSections">Add to</label></dt>
<dd><select id="selSections" runat="server" /></dd>
<dt><label for="txtName">Name</label></dt>
<dd><input type="text" runat="server" id="txtName" /></dd>
<dt><label for="selDefaultArticle">Default Article</label></dt>
<dd><select id="selDefaultArticle" runat="server" /></dd>
</dl>
<div>
<button id="btnAdd">Add</button>
</div>
<script src="../scripts/Categories.js" type="text/javascript"></script>
-------------------------------------------------------------------------------------
And here's the script:
-------------------------------------------------------------------------------------
var radSection;
var radCategory;
var selSections;
var btnAdd;
document.onload = function() {
radSection = document.getElementById("radSection");
radCategory = document.getElementById("radCategory");
selSections = document.getElementById("selSections");
btnAdd = document.getElementById("btnAdd");
radSection.onclick = function() {
selSections.Enabled = false;
btnAdd.innerHTML = "Add Section";
}
radCategory.onclick = function() {
selSections.Enabled = true;
btnAdd.innerHTML = "Add Category";
}
}
var radSection;
var radCategory;
var selSections;
var btnAdd;
document.onload = function() {
radSection = document.getElementById("radSection");
radCategory = document.getElementById("radCategory");
selSections = document.getElementById("selSections");
btnAdd = document.getElementById("btnAdd");
radSection.onclick = function() {
selSections.Enabled = false;
btnAdd.innerHTML = "Add Section";
}
radCategory.onclick = function() {
selSections.Enabled = true;
btnAdd.innerHTML = "Add Category";
}
}
-------------------------------------------------------------------------------------
Firefox nor IE report any script errors, yet I can't see why it isn't
working. Any ideas?
Thanks