Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Prompts on the Web Based application

Status
Not open for further replies.

sam2601

Programmer
Apr 9, 2004
81
US
Hi Guys,

I have submit button and have code behind it as a Formula.
After they hit the button and after doing the needed validation i need to prompt if it has been submitted or has any problems.The @prompt works in notes client.Since i have code as formula in can'nt add javascript alert there..So in this case what are my best chances to show a prompt on a web based form.

Any ideas surely appreciated
 
Here's what we do to for validation and to display a prompt to web browser clients:
* Add a function to the 'JS Header' section of the form and call it something like validateForm()
* Put the necessary javascript code in this function to check and perform validation of fields on the form. If any validation fails you can display an alert box and return 'False' from this function.
* If the validateForm() function doesn't find any problems retun 'True'
* In the 'onSubmit' section of the form all you need is the following code: "return validateForm();". If the function call is successful the form will submit, if not it won't submit.


An alternative option is to have Input Validation formulas in your fields and if validation fails change the output message (@Failure message) according to the client in use. For example:
@If(
@ClientType="Notes";
"Please enter the details for the field";
"The details for the field must be entered. Please click the Back button in your browser to return to your form."
)

Then in your Submit button you would need the following:
@If(
@Command([FileSave]);
@Command([FileCloseWindow]);
""
)


Hope this helps.

Alex


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top