hi i have a javascript function as follows
Code:
function fnIsTextBoxEmpty(frmName,ctrlName) {
if(frmName.ctrlName.value == "")
return true;
else
return false;
}
Now this is called as follows
Code:
var frm = document.forms[0];
if(fnIsTextBoxEmpty(frm,'name'))
alert("Empty");
'name' is a textbox.
The problem here is that the function fnIsTextBoxEmpty does not take the 'name' as the control name but the 'ctrlName'.
I am aware that i can use document.getElementById but it I know that this is not available for Netscape.
Also i hear that eval() is not very reliable so i dont want to use it.
So Plz can someone tell me the solution
Thanks