Function to Catch Enter Key press and accordingly perform the required task:
function catchEnter(){
if(window.event.keyCode == 13){
document.all.S.click();
}
}
function catchEnter(){
if(window.event.keyCode == 13){
document.all.S.click();
}
}
| Sub Querysave(Source As Notesuidocument, Continue As Variant) If ( Source.FieldGetText( "rtfield" ) = "" ) Then Messagebox( "Please enter some text." ) Call Source.GotoField( "rtfield" ) Continue = False End If End Sub |
| Sub Querysave(Source As Notesuidocument, Continue As Variant) Dim rtitem As NotesRichTextItem Set doc = Source.Document Set rtitem = doc.GetFirstItem( "rtfield" ) Dim text As String text$ = Source.FieldGetText("rtfield") trimmed$ = Trim(text) if ( trimmed$ = "") Then Msgbox "Please enter some text." Continue = False source.GotoField("rtfield") source.Refresh(True) Else Continue = True End If End Sub |
| Sub Querysave(Source As Notesuidocument, Continue As Variant) Dim rtitem As NotesRichTextItem Set doc = Source.Document Set rtitem = doc.GetFirstItem( "rtfield" ) Dim text As String text$ = Source.FieldGetText("rtfield") trimmed$ = Trim(text) If(doc.Hasembedded) Then Continue = True Elseif ( trimmed$ = "") Then Msgbox "Please enter some text." Continue = False source.GotoField("rtfield") source.Refresh(True) Else Continue = True End If End Sub |