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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
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
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
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
ASKER
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.
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.
ASKER