Hi i have radio button that puts text in a textbox that is converted to a Datetime in the textbox but sometimes the textbox will not have all off the dates in it so i want the Javascript to detect this
and show an alert message
Here is my Javascript code
<script type="text/javascript">
function CheckLine(obj) {
var radios = document.getElementsByName(obj.name);
for (var k = 0; k < radios.length; k++) {
var controls = radios[k].parentNode.parentNode.parentNode.getElementsByTagName('INPUT');
for (var i = 0; i < controls.length; i++) {
if (controls[i].type == 'checkbox')
controls[i].checked = radios[k].checked;
}
}
var txt = document.getElementById("<%=txtCode.ClientID %>");
var o = obj.parentNode.nextSibling;
if (o == null)
o = obj.parentNode.nextElementSibling;
txt.value = o.innerHTML;
test();
}
function test(ctl) {
var Inputs = document.getElementsByTagName("input");
var txt = document.getElementById("<%=TextBox1.ClientID%>");
txt.value = '';
for (var n = 0; n < Inputs.length; ++n)
if (Inputs[n].type == 'checkbox' && Inputs[n].checked) {
var o = Inputs[n].nextSibling;
if (o == null)
o = Inputs[n].nextElementSibling;
txt.value += o.innerHTML + ',';
}
if (txt.value.length > 0) {
txt.value = txt.value.substring(0, txt.value.length - 1);
}
dothis()
}
}
</script>
Similar:
- Calling multiple javascript function onclick How to Call multiple javascript function onclick in this chechbx.attribuites.add("onclick", >>>>>> with these JS <script type = "text/javascript"> function checkMe(ch, cell) { if (ch.checked) { ...
- Javascript not working as expected in FF Hi there. I have a HTML page with multiple dynamic check boxes that I select, click "add" and it adds a list to the users...
- add the value of multiple radio button onclick Hi i am doing a application that add the rate of the staff evaluation please go through o=it and need help Expand|Select|Wrap|Line Numbers <?php include("../db.php");...
- ASP.NET – writing to text file – Request.Form[] problem Hey guys, I've been trying to fix this for a whole day now, and I just can't seem to figure it out… I'm trying to...
- Submit button only works after checkbox is checked Hello, I am trying to set something up like this – there is a button that takes you to a page where the user can...