Hello,
I have 2 dropdowns, 2 textboxes and two buttons in my form. OnClick the button does certain things. before that, I need to validate a condition. the condition is that if only the txtbox2 is clicked, and no other parameter is selected / entered, then I should show a pop up saying the "txtBox 2 alone can't be entered, and Please also select item from first dropdown!".. Logic needed is not complicated. I am having a problem in finding the object in my javascript function.
I ahve called IsTREmpty() on OnClientClick event for the button. I am getting the error saying object required. How can I access the form element in my javascript.?
I have 2 dropdowns, 2 textboxes and two buttons in my form. OnClick the button does certain things. before that, I need to validate a condition. the condition is that if only the txtbox2 is clicked, and no other parameter is selected / entered, then I should show a pop up saying the "txtBox 2 alone can't be entered, and Please also select item from first dropdown!".. Logic needed is not complicated. I am having a problem in finding the object in my javascript function.
I ahve called IsTREmpty() on OnClientClick event for the button. I am getting the error saying object required. How can I access the form element in my javascript.?
function
IsTREmpty() {
var tr = document.getElementById('rdCmbTR').value;
var tt = document.getElementById('rdCmbTT').value;
var tid = document.getElementById('rdTxtTId').value;
var tDesc = document.getElementById('rdTxtTDesc').value;
alert(tDesc.length);
if (tDesc.length > 0) {
if (tt == -1 && tid.length == 0 && tr == -1) {
alert('Please Select T R'); }
}
}