+ Reply to Thread
Results 1 to 2 of 2

Thread: Validate a field in eRPG/CGI programming

  1. #1

    Default Validate a field in eRPG/CGI programming

    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.

  2. #2
    Guest.Visitor Guest

    Default Validate a field in eRPG/CGI programming

    I know I've asked this question before, but I'm still in the dark about it. How would I validate say a customer number field on a web browser form? I know how to validate simple fields with java script, that don't necessarily need 400 data to check against. I do know how to post and get data from the form and bring it into my program or database. But I'm totally clueless as to how to check and field and display it on the same page like some of the guys on this forum do. Like we do on a regular green screen. Thanks in advance.

+ Reply to Thread

Similar Threads

  1. Replies: 7
    Last Post: 02-11-2004, 04:40 AM
  2. Validate a field with a word dictionary
    By lls_51@yahoo.com in forum General
    Replies: 1
    Last Post: 08-29-2003, 09:45 AM
  3. Musicality in the Programming Field
    By Guest.Visitor in forum Analysis
    Replies: 55
    Last Post: 10-19-2001, 10:08 AM
  4. eRPG and CvtDB
    By Guest.Visitor in forum Programming
    Replies: 1
    Last Post: 02-09-2001, 07:30 AM
  5. Replies: 4
    Last Post: 12-19-2000, 10:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts