vrozen1
11-02-2001, 05:54 AM
Michael, there is some scenarios in your CGI. 1 - all fields valid and CGI completes required action and build next screen for a user. 2 - Some values are invalid. The CGI builds your first screen (one with a form) and add error text at the bottom. 3-Same as 2, but you add extra input hidden field into a form. Then CGI builds in JavaScript that display alert. This is how it could be: .... form onSubmit="return Validate(this)" ACTION="http://186.167.34.56:8080/cgi/FrmMaint" METHOD="POST" NAME="ADDUPDGRP" .... Input type="HIDDEN" name="ERROR" value="Customer is invalid." SCRIPT if (document.ADDUPDGRP.ERROR != null){ alert(document.ADDUPDGRP.ERROR.value); } /SCRIPT /form Of course, it is better to have 3-tier application rather than CGI. That will give you possibility to redirect response to your initial html instead of build it in CGI. Well, it will be interesting, if somebody know how to redirect in RPG/CGI.