Status Dialog - Programmer Usage Reference

 

Configuration
This component can be added to all web applications so it can be used to select a folder from server.  Do the following configuration steps.

  1. Source Programs - Copy the following SCL code into entries and JS file into folder.  This can be stored in the SHARECOM or in a centralized location.

    a. DOJO COMPONENT - download Javascript component then uncompress this to js folder: /js/dojo, /js/dojo/src, ...

    b. POPUP_DIALOG.JS - Copy the following JavaScript file into an JS folder  named "POPUP_DIALOG.JS".

    Open this file, change toolname to your tool's folder name:

    // Name of tool's folder
    var toolname="sharecome";

    c. STYLE.CSS - Replace your current css with this file. This is the css file for all tool.

    d. IMAGES - uncompress and copy these files into Images folder of your tool.

    e. Dialog - Please paste the following code segment in all your html pages which you want to show the dialog:

    Inside <head> tag, at top of other script tags:
    <script type="text/javascript" src="../syvalidate/js/dojo/dojo.js"></script>
    <script type="text/javascript">
       dojo.require("dojo.widget.Dialog");
    </script>

    Above </form> tag:
    <div dojoType="dialog" id="statusdialog" bgColor="white" bgOpacity="0.5" toggle="fade" toggleDuration="250" style="display:none"></div>

    f. WREPORTDIALOG.SCL - Copy the following SCL code into a an entry named "WREPORTDIALOG.SCL".  This can be stored in the SHARECOM or in a centralized location.
    *** Show the dialog ***;
    call display('Wreportdialog.scl', titlelst, subjectlst, contentlst, 'header text', 'footer text');

    g. Sample report code -  Copy the following SCL code into a SCL program you want to generate the report.  This can be stored in the catalog of your current tool.
     

  2. Waiting dialog Call - All other programs that is used to verify calls it with the following template.

  3. // Java code
    function waitingBox(text, headher, footer)
    "text" parameter can be text or html code.
    Ex: waitingBox("Program submitting...");


  4. Dialog Call: popupDlg(xmlHttp, query, strMess, strDes, action, header, footer)
    xmlHttp: instance of XMLHTTP object
    query: address to scl program
    strMess: item no. 3 in Picture 1below. This must be following the structure: NAME - Message.
    Ex: NOTE - The program was submitted ...
    strDes: desciption for strMess. This can be html code.
    acttion: post action, the action after closing status dialog. This can be null.
    header/footer: header/footer of dialog

    a. Client report generating - All other programs that is used to verify calls it with the following template.
    // Java code
    popupDlg(null, '', strMess, strDes, action, 'Message Box', '')
    Ex: onclick="popupDlg(null, '', 'NOTE - The program was submitted successfully.', 'This is the message from client side.', null, '', '');"

    b. Server report generating - All other programs that is used to verify calls it with the following template. You can see Sample code for example.
    // Java code
    var query = "/cgi-bin/syvalidate.exe?_PROGRAM=syvallib.wsyvalidate.wsubmit_version2.scl&_SERVICE=default&source="+svalue+"&syaction=mylibname";
    this.popupDlg(xmlHttp, query, "", "", "Message Box" , "");

    Picture 1:

    Note1: Header text 2: Footer text 3: titlelst 4: subjectlst 5: contentlst

 
 last updated on November 26, 2007 by An Truong