adrive
11-21-2007, 06:52 AM
hi,
i'm wondering what am i doing wrong as i'm not able to use some of the properties of an object once i passed into the javascript . For example,
I can't access the "name" attribute within the function.
in a html page :
1.) alert(document.frmNote.txtDate.value); //shows 'Hello'
2.) an onclick=validate(document.frmNote.txtData, 'Testing');
in a common.js file :
function validate(objectx, title){
alert("name " + objectx.name);
alert("val " + objectx.value); //this is where i get no actions found for this object
if(objectx.value !=null && length(objectx.value) > 0)
{
return true;
}else{
alert(title + " is empty.");
return false;
}
}
i'm wondering what am i doing wrong as i'm not able to use some of the properties of an object once i passed into the javascript . For example,
I can't access the "name" attribute within the function.
in a html page :
1.) alert(document.frmNote.txtDate.value); //shows 'Hello'
2.) an onclick=validate(document.frmNote.txtData, 'Testing');
in a common.js file :
function validate(objectx, title){
alert("name " + objectx.name);
alert("val " + objectx.value); //this is where i get no actions found for this object
if(objectx.value !=null && length(objectx.value) > 0)
{
return true;
}else{
alert(title + " is empty.");
return false;
}
}