How about 
  if (document.pgXXDetail.tbUserID != null && 
        document.pgXXDetail.tbUserID.value=="") 

Leon

Janet Traub wrote:
> 
> I have a page that runs in dual mode: INSERT and
> UPDATE. One column on this freeform page is a TextBox.
> When the page runs in UPDATE mode I'd like to hide the
> TB and replace it with R/O StaticText. (BTW, the
> reason I'm hiding it is this col is the PK for the
> table so I want to prevent users from modifying it.)
> 
> The only problem is, I have a javascript validation
> function on this page that references the TextBox (see
> snippet below). So I'm wondering what's the best way
> to code this behavior so the Javascript snippet below
> won't choke when the TextBox goes into hiding during
> UPDATE mode.
> 
> Very basic Javascript snippet:
> if (document.pgXXDetail.tbUserID.value==""
> {
>   if(errors.length==0){
>   document.pgXXDetail.tbUserID.focus();
>    }
>    errors += "UserID is required.\n";
> }
> 
> THX,
> Janet
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to