Perhaps you could assist me w/some - I think I need other eyes to look at this at this point. The error is on the line 'if ( ( glAction = "E"
&& ( isWhiteSpace(document.frmCommentsAVED.txtCommentText.value) ) ).
Error: expected object
Below I've listed my form tag, the table section for the text field that I'm validating, the table section for the submit button and the clientside validatation javascript.
First I list all database rows that match a key. I chose the 'edit' option on one row which contains data in txtCommentText. I space out the data in that field and click on Confirm Edit and I get the error.
Thanks for anything that you can contribute!
<% Sub subDisplayForm() %>
<form method="post" name="frmCommentsAVED" id="frmCommentsAVED" action="" LANGUAGE="javascript" onsubmit="return ValidateFields()">
------------------------------
<tr valign="top">
<td align="left">
<strong>Comment :</strong>
</td>
<td align="left">
<% if glAction = "E" then %>
<input type="text" name="txtCommentText" id="txtCommentText" value="<%=strCommentText%>"
size="30" maxlength="1000" class="toUpper">
<% else %>
<strong><%=strCommentText%></strong>
<% end if %>
</td>
</tr>
----------------------------
<% If glAction = "E" Then %>
<input type="submit" name="sbmSave" id="sbmSave" value="Confirm Edit" style="BACKGROUND-COLOR: teal; COLOR: white; FONT-SIZE: smallest; FONT-WEIGHT: bold; WIDTH: 160px" >
<% elseif glAction = "D" Then %>
<input type="submit" name="sbmSave" id="sbmSave" value="Confirm Delete" style="BACKGROUND-COLOR: teal; COLOR: white; FONT-SIZE: smallest; FONT-WEIGHT: bold; WIDTH: 160px" >
<% End If %>
----------------------------
function ValidateFields()
{ //for Edit, verify that comment text has been entered
if ( ( glAction = "E"
&& ( isWhiteSpace(document.frmCommentsAVED.txtCommentText.value) ) )
{
alert("Comment is a required field."
;
document.frmCommentsAVED.txtCommentText.focus() ;
return false ;
}
else
{
document.frmCommentsAVED.sAction.value = lAction+"SAVE" ;
return true ;
}
}

Error: expected object
Below I've listed my form tag, the table section for the text field that I'm validating, the table section for the submit button and the clientside validatation javascript.
First I list all database rows that match a key. I chose the 'edit' option on one row which contains data in txtCommentText. I space out the data in that field and click on Confirm Edit and I get the error.
Thanks for anything that you can contribute!
<% Sub subDisplayForm() %>
<form method="post" name="frmCommentsAVED" id="frmCommentsAVED" action="" LANGUAGE="javascript" onsubmit="return ValidateFields()">
------------------------------
<tr valign="top">
<td align="left">
<strong>Comment :</strong>
</td>
<td align="left">
<% if glAction = "E" then %>
<input type="text" name="txtCommentText" id="txtCommentText" value="<%=strCommentText%>"
size="30" maxlength="1000" class="toUpper">
<% else %>
<strong><%=strCommentText%></strong>
<% end if %>
</td>
</tr>
----------------------------
<% If glAction = "E" Then %>
<input type="submit" name="sbmSave" id="sbmSave" value="Confirm Edit" style="BACKGROUND-COLOR: teal; COLOR: white; FONT-SIZE: smallest; FONT-WEIGHT: bold; WIDTH: 160px" >
<% elseif glAction = "D" Then %>
<input type="submit" name="sbmSave" id="sbmSave" value="Confirm Delete" style="BACKGROUND-COLOR: teal; COLOR: white; FONT-SIZE: smallest; FONT-WEIGHT: bold; WIDTH: 160px" >
<% End If %>
----------------------------
function ValidateFields()
{ //for Edit, verify that comment text has been entered
if ( ( glAction = "E"

{
alert("Comment is a required field."

document.frmCommentsAVED.txtCommentText.focus() ;
return false ;
}
else
{
document.frmCommentsAVED.sAction.value = lAction+"SAVE" ;
return true ;
}
}