The goal-
the check box as default is unchecked and when checked validates a text area for text
Any ideas?
function checkText() // check box
{
if (document.Forders.card.checked == false)//true?
{}
if( document.Forders.special.value.length ==0 ||document.Forders.special.value == “Enter your personal message here” )
{
alert ( “Please enter your personal message in the text area” );
return false;
}
}
If im following correctly the following is what you want
function checkText( ele ) // check box
{
var special = document.Forders.special.value;
if ( ele.checked ) // true?
{
if ( special.length == 0 || special == "Enter your personal message here" )
{
alert( "Please enter your personal message in the text area" );
return false;
}
}
}