Link to home
Start Free TrialLog in
Avatar of woodlott
woodlott

asked on

Input Validation with Java Script

Hi experts,

in my web-application I have a form with a field that is checked for it is empty or not. I check this field over a Java-Script with the onSubmit Event on the form. Furthermore I have a Save and a Close (Action Button). The problem is that the onSubmit Event runs before the Lotus Formula in the Close Button. That means the field is also checked if I click the Close Button. Should I take another event or must I solve this by a completely another way. What is the best way in a web-application to make a input validation ?
Over Java Script Lotus Script or something else ? Can someone give me an exaple ?

Thanks a lot Tom
Avatar of woodlott
woodlott

ASKER

Adjusted points from 20 to 30
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, this URL will show you how to combine Javascript with Notes actions.  I think you will find it very helpful for what you are trying to do.
Thank you Hemanth,

first I forgot to say that I use Release 5, but I think it will be make the problems more less. I don't know how I make the first point. What I must I write in the JS Header event on the Form. I don't understand the line

[--Field "Alert", Computed For Display, Formula:Alert--]
and
1. Write the following passthru HTML

hope you can help me onesmore

Thanks
Tom
 
Hi Tom

I am sorry for being so cryptic, Ok

[--Field "Alert", Computed For Display, Formula:Alert--]

means

Create a field named alert and set it as computed for display and default value as alert.

once you create this on the top of the form, block the test and make it as passthru html from text menu.

Your javascipt looks similar to this

<Script Language="Javascript">
[Alert]
</Script>

~Hemanth
Thank you Hemanth,

your formula works great, but I don't understand the function of the JavaScript. The Validation works also witzout the Script in the top of the form.