Need help scripting a DW form to dump into a MDB

I have been tasked with building a form which will dump into
an Access MDB table. That done, I do not see in DW how to cause the
action. Although I have created the Submit button and there is an
action associated with that button type, nothing happens when the
form is filled out. So I am missing an important
link....Help!

you need to submit it to another file which in turn will
insert the information on the fold field using SQL. for example...
INSERT INTO contact
VALUES FORM.Firstname, FORM.LastName, FORM.Phone
I don't know what programming code you are using (Coldfusion,
PHP, ASP ..etc).
Here's more information.
http://www.w3schools.com/sql/sql_insert.asp

Similar Messages

  • Need help in alignment a form

    Hello,
    I am new in writing HTML code. I need help to align my Form
    and it's text.
    Please view my code and please show me how to align all the
    square boxes (the square box is where the user type the text
    input). Currently I have 2 boxes but they are not aligned. The
    below is my code:
    <FORM name="input" method="get" >
    PROJECTROOT: <INPUT TYPE=TEXT SIZE=50 NAME=proj_root>
    <br>
    FRONTEND: <INPUT TYPE=TEXT SIZE=50 NAME=frontend>
    <br>>
    <BR>
    <INPUT TYPE=SUBMIT VALUE=Submit onclick="save()">
    <BR>
    </FORM>
    Would you please help.
    Thank you very much
    Goober35

    <form name="input" method="get" action=""> <!-- ARE
    YOU SURE YOU NEED "GET"
    and not "POST"? -->
    <table cellspacing="0" cellpadding="0" border="0"
    width="300">
    <tr>
    <td><label for="proj_root">PROJECTROOT:
    </label></td>
    <td><input type="text" size="50" name="proj_root"
    id="proj_root"></td>
    </tr>
    <tr>
    <td><label for="frontend">FRONTEND:
    </label></td>
    <td><input type="text" size="50" name="frontend"
    id="frontend"></td>
    </tr>
    <tr>
    <td colspan="2" align="center"><input type="submit"
    name="submit"
    id="submit" value="Submit" onclick="save()"></td>
    </tr>
    </table>
    </form>
    (your form needs an action attribute value)
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "goober35" <[email protected]> wrote in
    message
    news:gcjmlh$p42$[email protected]..
    > Hello,
    > I am new in writing HTML code. I need help to align my
    Form and it's text.
    > Please view my code and please show me how to align all
    the square boxes
    > (the
    > square box is where the user type the text input).
    Currently I have 2
    > boxes but
    > they are not aligned. The below is my code:
    >
    > <FORM name="input" method="get" >
    > PROJECTROOT: <INPUT TYPE=TEXT SIZE=50
    NAME=proj_root> <br>
    > FRONTEND: <INPUT TYPE=TEXT SIZE=50 NAME=frontend>
    <br>>
    > <BR>
    > <INPUT TYPE=SUBMIT VALUE=Submit onclick="save()">
    <BR>
    >
    > </FORM>
    >
    >
    > Would you please help.
    >
    > Thank you very much
    > Goober35
    >
    >
    > <FORM name="input" method="get" >
    > PROJECTROOT: <INPUT TYPE=TEXT SIZE=50
    NAME=proj_root> <br>
    > FRONTEND: <INPUT TYPE=TEXT SIZE=50 NAME=frontend>
    <br>>
    > <BR>
    > <INPUT TYPE=SUBMIT VALUE=Submit onclick="save()">
    <BR>
    >
    > </FORM>
    >

  • Need help in posting a Form

    Hi Everybody,
    I'm having a Struts application that uses DynaValidatorForm for performing Validations.
    The basic flow is like this -> I've got a home page, then a login page (action -> register.do) & a third page (action -> authenticate.do) which is displayed after authenticating the user.
    I'm trying to re-direct the user to the home page once he directly accesses /authenticate.do
    For this, in the Action class of /register, I'd defined a session attribute & set a value to it.
    Then, in the Action class of /authenticate, I'm checking for the session attribute. If not present, I'm re-directing the user to home page.........
    The problem that I'm facing is that when I directly access /authenticate.do, the application is not getting re-directed & instead, it is displaying error messages that User name & password (the 2 fields present in my login page) are required..........
    The <action> tag of /authenticate.do has got validate="true" & hence it seems that validation occurs before re-directing....
    Therefore, can someone tell me why is the application not posting the form to Action class of /authenticate........
    Thanx in advance.....
    Regards,
    Sasidharan N

    <form name="input" method="get" action=""> <!-- ARE
    YOU SURE YOU NEED "GET"
    and not "POST"? -->
    <table cellspacing="0" cellpadding="0" border="0"
    width="300">
    <tr>
    <td><label for="proj_root">PROJECTROOT:
    </label></td>
    <td><input type="text" size="50" name="proj_root"
    id="proj_root"></td>
    </tr>
    <tr>
    <td><label for="frontend">FRONTEND:
    </label></td>
    <td><input type="text" size="50" name="frontend"
    id="frontend"></td>
    </tr>
    <tr>
    <td colspan="2" align="center"><input type="submit"
    name="submit"
    id="submit" value="Submit" onclick="save()"></td>
    </tr>
    </table>
    </form>
    (your form needs an action attribute value)
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "goober35" <[email protected]> wrote in
    message
    news:gcjmlh$p42$[email protected]..
    > Hello,
    > I am new in writing HTML code. I need help to align my
    Form and it's text.
    > Please view my code and please show me how to align all
    the square boxes
    > (the
    > square box is where the user type the text input).
    Currently I have 2
    > boxes but
    > they are not aligned. The below is my code:
    >
    > <FORM name="input" method="get" >
    > PROJECTROOT: <INPUT TYPE=TEXT SIZE=50
    NAME=proj_root> <br>
    > FRONTEND: <INPUT TYPE=TEXT SIZE=50 NAME=frontend>
    <br>>
    > <BR>
    > <INPUT TYPE=SUBMIT VALUE=Submit onclick="save()">
    <BR>
    >
    > </FORM>
    >
    >
    > Would you please help.
    >
    > Thank you very much
    > Goober35
    >
    >
    > <FORM name="input" method="get" >
    > PROJECTROOT: <INPUT TYPE=TEXT SIZE=50
    NAME=proj_root> <br>
    > FRONTEND: <INPUT TYPE=TEXT SIZE=50 NAME=frontend>
    <br>>
    > <BR>
    > <INPUT TYPE=SUBMIT VALUE=Submit onclick="save()">
    <BR>
    >
    > </FORM>
    >

  • Need help for publishing web intelligence document (universe) into InfoView

    Post Author: mirage
    CA Forum: Publishing
    Hello all,
    I need help for publishing web intelligence document (universe) into InfoView.
    can't find this information in Business Objects Designer's Guide and in Business Objects Administrator Guide.
    Can somebody give short instructions how can I do it?
    Regards, Slava

    If the change between the 2 types of data has to happen dynamically during run time them
    1. Use 2 dataproviders
         a. Current
         b. Historic
    2. Merge the 2 dimensions
    3. Use Webi variable to switch between the measure of the current and historic universe
    Ex  if [year] < 2010 then historic.[expense] else current.[expense]
    Hope this helps,
    Divya

  • Need help in formating a form dealing with negative currency

    Need Help!!!
    Creating forms in Adobe acrobat Pro I could format a number cell to calculate additions/subtractions of currency. If the result was negative I could get the cell to show the negative result in red text and show parentheses around them. How can I do that in LiveCycle?
    If i have to use formcalc - what would i type in?

    In LiveCycle can be done using the Numeric Field object and some formcalc script.
    Use the "Numeric Field" from the Object Library. For the Field patterns (Select the placed numeric field, On object Window Object -> Field) use "num.currency{}" to show the currency(Ex: $) and "parentheses" if its negative. Write some script to show red text/border in red .
    On exit event of the Numeric Field here is the script:
    if($.rawValue <0) then $.font.fill.color.value = "255,0,0" endif  // This will make entire text in red color if the value is negative.
    if($.rawValue <0) then $.validate.nullTest = "error" endif      //This will make border of the field in red color if the value is negative.
    Hope this helps.

  • Need help scripting a sliding volume scale.

    Hi, I hope this is in the right section, I am trying to make
    a flash flv player (sort of like youtube) for my site. I have it
    practically done but need a better volume adjustment. Currently, I
    have only been able to figure out how to make a sound on/off button
    but what I would really like is the volume control found on this
    player.
    http://www.jeroenwijering.com/?item=JW_Media_Player
    Could someone please help me with the script for it? I am
    really new to flash but I made the following 3 objects in the
    library. Solid black graphic in to a movie object, 1 solid black
    graphic in to a button, and one light grey graphic in to a button.
    I assume I need a script for each of those 3 objects. Thanks for
    the help!
    P.S. Using Adobe Flash CS3 Trial

    you need to submit it to another file which in turn will
    insert the information on the fold field using SQL. for example...
    INSERT INTO contact
    VALUES FORM.Firstname, FORM.LastName, FORM.Phone
    I don't know what programming code you are using (Coldfusion,
    PHP, ASP ..etc).
    Here's more information.
    http://www.w3schools.com/sql/sql_insert.asp

  • Need help creating a simple form in Dreamweaver CS3!!

    I'm trying to create a form in Dreamweaver CS3, and while I have the form built I'm confused as to how to make it actually function.  What I'm trying to do is create a form that when the visitor clicks submit, the data is emailed to me.  Can someone help me figure out how to accomplish this?
    Thanks so much!

    Ute's answer is spot on - you need a FormMail script to process the form.  Check with your host (or via the control panel) and see if they supply such a form for free.
    If not, google for "formail script' and you'll find quite a few available - all free to use.
    You just need to add a couple of lines to your html code, change a few things in the formmail script and the form will process.  Sounds complicated but most scripts come with a help file to help you get off the ground.
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://www.perrelink.com.au
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    http://csstemplates.com.au/
    http://twitter.com/nadiap

  • Need help with PHP contact form

    Hi guys,
    I've made a PHP contact form for my site and need help with a couple of things:
    The form action links an external PHP script (scripts/contact-form-script.php) but is there a way I can have it so the PHP script for the form is contained within the same PHP file as my contact form (contact.php)?
    I tried just putting the form code at the top of contact.php but the browser automatically reads the anti-spam re-direct, so maybe that needs revising too?
    The second thing is, how can I make the Name, Email and Message fields mandatory? So if a user tries to submit the form and hasn't filled in one of the required fields and clicks submit, contact.php reloads with a message at the top of the form saying something like 'Complete the required fields' and highlights the relevant field with a red border?
    Here's the code for contact.php:
    <form action="http://www.mydomain.com/scripts/contact-form-script.php" method="post" name="contact" id="contact">
    <p><strong>Name:*</strong><br />
    <input name="name" type="text" class="ctextField" /></p>
    <p><strong>E-mail:*</strong><br />
    <input name="email" type="text" class="ctextField" /></p>
    <p><strong>Telephone:</strong><br />
    <input name="telephone" type="text" class="ctextField" /></p>
    <p><strong>Company:</strong><br />
    <input name="company" type="text" class="ctextField" /></p>
    <p><strong>Address:</strong><br />
    <input name="address1" type="text" class="ctextField" /></p>
    <p><input name="address2" type="text" class="ctextField" /></p>
    <p><strong>Town:</strong><br />
    <input name="town" type="text" class="ctextField" /></p>
    <p><strong>County:</strong><br />
    <input name="county" type="text" class="ctextField" /></p>
    p><strong>Postcode:</strong><br />
    <input name="postcode" type="text" class="ctextField" /></p>
    <p><strong>Message:*</strong><br />
    <textarea name="message" cols="55" rows="8" class="ctextField"></textarea></p>
    <p><input name="submit" value="SEND MESSAGE" class="submitButton" type="submit" /><div style="visibility:hidden; width:1px; height:1px"><input name="url" type="text" size="45" id="url" /></div></p>
    </form>
    And this is the PHP I'm using to submit the form data for contact-form-script.php:
    <?php
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $to = "[email protected]";
    $subject = "Contact from website";
    $message = $headers;
    $message .= "Name: " . $_POST["name"] . "\r\n";
    $message .= "E-mail: " . $_POST["email"] . "\r\n";
            $message= '
                <table cellspacing="0" cellpadding="8" border="0" width="500">
                <tr>
                    <td colspan="2"></td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td width="154" style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Name</strong></td>
                  <td width="314" style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$name.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>E-mail address:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$email.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Telephone number:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$telephone.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Company:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$company.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Address</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$address1.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$address2.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Town</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$town.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>County</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$county.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Postcode</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$postcode.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                    <td colspan="2" style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Message</strong></td>
                </tr>              
                <tr bgcolor="#eeeeee">
                    <td colspan="2" style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$message.'</td>
                </tr>              
                <tr><td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr>
             </table>
    $url = stripslashes($_POST["url"]);
    if (!empty($url)) {
    header( 'Location: http://www.go-away-spam-robots.com' );
    exit();
    mail($to, $subject, $message, $headers);
    header( 'Location: http://www.mydomain.com/sent.php' ) ;
    ?>
    Any help on this would be greatly appreciated.
    Thank you and I hope to hear from you!
    SM

    Revised code with form validation for Name Email and Message:
    <?php
    if (array_key_exists('submit', $_POST)) {
        $name = $_POST['name'];
        $email = $_POST['email'];
        $telephone = $_POST['telephone'];
        $company = $_POST['company'];
        $address1 = $_POST['address1'];
        $address2 = $_POST['address2'];
        $town = $_POST['town'];
        $county = $_POST['county'];
        $postcode = $_POST['postcode'];
        $formMessage = $_POST['message'];
    if (empty($name)) {
                                                $warning['name'] = "Please provide your name";
    if (empty($email)) {
                                                $warning['email'] = "Please provide your email";
    if (empty($formMessage)) {
                                                $warning['message'] = "Please provide your message";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $to = "[email protected]";
    $subject = "Contact from website";
    $message = $headers;
    $message .= "Name: " . $_POST["name"] . "\r\n";
    $message .= "E-mail: " . $_POST["email"] . "\r\n";
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
            $message= "
    <table cellspacing='0' cellpadding='8' border='0' width='500'>
                <tr>
                    <td colspan='2'></td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td width='154' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Name</strong></td>
                  <td width='314' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$name."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>E-mail address:</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$email."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Telephone number:</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$telephone."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Company:</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$company."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Address</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$address1."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$address2."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Town</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$town."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>County</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$county."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Postcode</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$postcode."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                    <td colspan='2' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Message</strong></td>
                </tr>              
                <tr bgcolor='#eeeeee'>
                    <td colspan='2' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$formMessage."</td>
                </tr>              
                <tr><td colspan='2' style='padding: 0px;'><img src='images/whitespace.gif' alt='' width='100%' height='1' /></td></tr>
             </table>
    $url = stripslashes($_POST["url"]);
    if (!empty($url)) {
    header( 'Location: http://www.go-away-spam-robots.com' );
    exit();
    if (!isset($warning)) {
    mail($to, $subject, $message, $headers);
    header( 'Location: http://www.mydomain.com/sent.php' ) ;
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    p {
        margin: 0;
        padding: 10px 0 0 0;
    .warning {
        color:#C00;
    </style>
    </head>
    <body>
    <form action="" method="post" name="contact" id="contact">
    <p><strong>Name:*</strong><br />
    <input name="name" <?php if (isset($warning['name'])) { echo "style='border: 1px solid #C00'"; } ?> type="text" class="ctextField" />
    <?php if (isset($warning['name'])) { echo "<p class='warning'>".$warning['name']."</p>"; }?>
    </p>
    <p><strong>E-mail:*</strong><br />
    <input name="email" <?php if (isset($warning['email'])) { echo "style='border: 1px solid #C00'"; } ?>type="text" class="ctextField" />
    <?php if (isset($warning['name'])) { echo "<p class='warning'>".$warning['email']."</p>"; }?>
    </p>
    <p><strong>Telephone:</strong><br />
    <input name="telephone" type="text" class="ctextField" /></p>
    <p><strong>Company:</strong><br />
    <input name="company" type="text" class="ctextField" /></p>
    <p><strong>Address:</strong><br />
    <input name="address1" type="text" class="ctextField" /></p>
    <p><input name="address2" type="text" class="ctextField" /></p>
    <p><strong>Town:</strong><br />
    <input name="town" type="text" class="ctextField" /></p>
    <p><strong>County:</strong><br />
    <input name="county" type="text" class="ctextField" /></p>
    <p><strong>Postcode:</strong><br />
    <input name="postcode" type="text" class="ctextField" /></p>
    <p><strong>Message:*</strong><br />
    <?php if (isset($warning['message'])) { echo "<p class='warning'>".$warning['message']."</p>"; }?>
    <textarea name="message" <?php if (isset($warning['message'])) { echo "style='border: 1px solid #C00'"; } ?> cols="55" rows="8" class="ctextField"></textarea></p>
    <p><input name="submit" value="SEND MESSAGE" class="submitButton" type="submit" /><div style="visibility:hidden; width:1px; height:1px"><input name="url" type="text" size="45" id="url" /></div></p>
    </form>
    </body>
    </html>

  • Need help with Adobe Interactive Form Saving

    Hi Gurus,
    I need your help with Adobe Interactive form saving.
    I have written the code in pre-save event to prompt a message when user didn't enter any value before saving. The form data should not be saved upon clicking save (Just prompt the message and exit form the form). Can u please advice me how to do this.
    Regards,
    Srini

    see the link: http://forms.stefcameron.com/2008/04/
    it says:
    preSave: Failed validations will not prevent the form from being saved however Acrobat/Reader will issue a special warning message, after issuing the validation error message, to inform the user that the validations failed. Iu2019m guessing this is because the user may be saving the form to continue filling it at a later time so the save canu2019t be completely prevented.
    regards,
    BJagdishwar.

  • Need help for working in forms

    Hi i am using oracle 10g and forms 6i.
    I written one query in toad it is working fine but when i put in forms-6i it's giving error. i understood that it's not taking inline views.
    Here i am going to put the query can any body please help to work in forms also.
    SELECT PART_NO,DESCRIPTION,DEFECT_QTY,DESTRUCTION_QTY,DEFECT_QTY-DESTRUCTION_QTY PENDING
                   FROM (SELECT ESD.PART_NO,EPM.PRT_DESCRIPTION DESCRIPTION,SUM(DEFECT_QTY) DEFECT_QTY,
                   NVL(SUM((SELECT SUM(DECODE(TRAN_TYPE,'E',QTY))
                   FROM EIIS_DEFECTTRANTB
                   WHERE REJ_NO=ESD.DRS_NO AND PART_NO = ESD.PART_NO)),0) DESTRUCTION_QTY
                   FROM EIIS_SUPDEFECT_HDR ESH,
                   EIIS_SUPDEFECT_DTL ESD,
         EPPS_PARTTB     EPM
                   WHERE ESH.DRS_NO = ESD.DRS_NO
                   AND     ESD.PART_NO = EPM.PRT_PARTNO          
                   AND     ESH.REJ_TYPE ='M'
                   AND     ESH.STATUS = 2
                   GROUP BY ESD.PART_NO,EPM.PRT_DESCRIPTION)
         WHERE DEFECT_QTY-DESTRUCTION_QTY>0
    Thanks in advance...
    Regards
    indra

    If it's working in toad it will definitely work in forms also,make sure that bind variables you are keeping should be in the data block..Try to print a message after your query so that you will know whether control is going to your query or not.
    Declare
    v_test         VARCHAR2(100);
    Begin
    SELECT PART_NO,DESCRIPTION,DEFECT_QTY,DESTRUCTION_QTY,DEFECT_QTY-DESTRUCTION_QTY PENDING
    INTO
    FROM (SELECT ESD.PART_NO,EPM.PRT_DESCRIPTION DESCRIPTION,SUM(DEFECT_QTY) DEFECT_QTY,
    NVL(SUM((SELECT SUM(DECODE(TRAN_TYPE,'E',QTY))
    FROM EIIS_DEFECTTRANTB
    WHERE REJ_NO=ESD.DRS_NO AND PART_NO = ESD.PART_NO)),0) DESTRUCTION_QTY
    FROM EIIS_SUPDEFECT_HDR ESH,
    EIIS_SUPDEFECT_DTL ESD,
    EPPS_PARTTB EPM
    WHERE ESH.DRS_NO = ESD.DRS_NO
    AND ESD.PART_NO = EPM.PRT_PARTNO
    AND ESH.REJ_TYPE ='M'
    AND ESH.STATUS = 2
    GROUP BY ESD.PART_NO,EPM.PRT_DESCRIPTION)
    WHERE DEFECT_QTY-DESTRUCTION_QTY>0
    message('Query is'  || v_test);
    END;Edited by: sandy on Feb 7, 2012 11:15 AM
    Edited by: sandy on Feb 7, 2012 11:16 AM

  • Need help pulling data from an outside file into my array.  Please help  =)

    Hi,
    I need help adapting my array to read the interest rates from an outside file. Here is my code and the outside file I wrote. Please help. Oh, the array in question is on line 259, inside of my calculation() method.
    Thanks...
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.NumberFormat;
    import java.text.DecimalFormat;
    import java.io.*;
    import javax.swing.JOptionPane;
    public class Workshop5 extends JFrame implements ActionListener
         //declare gui components
         //declare labels
         JPanel contentPane = new JPanel();
         JPanel graphPane = new JPanel();
        JLabel instructionLabel = new JLabel();
        JLabel amountLabel = new JLabel();
         JLabel orLabel = new JLabel();
         JLabel comboBoxLabel = new JLabel();
         JLabel termLabel = new JLabel();
         JLabel rateLabel = new JLabel();
         JLabel calcLabel = new JLabel();
         JLabel paymentLabel = new JLabel();
         JLabel tableLabel = new JLabel();
         //declare font object
         Font labelFont = new Font("Tahoma", Font.PLAIN, 16);
         //declare text fields
         JTextField amountField = new JTextField(20);    
         JTextField termField = new JTextField(20);     
         JTextField rateField = new JTextField(20);
         JTextField paymentField= new JTextField(20);
         //declare combo box for loan selection
         JComboBox comboBox = new JComboBox();
        //declare button group and radio buttons
        ButtonGroup buttonGroup = new ButtonGroup();
        JRadioButton enterRadioButton = new JRadioButton("Enter amount, term, & rate", true);
        JRadioButton selectRadioButton = new JRadioButton("Select a preset term/rate loan", false);
         //declare button objects
         JButton clearButton = new JButton();
        JButton calcButton = new JButton();
        JButton quitButton = new JButton();
         //declare text area for amortization
         JTextArea amortTextArea = new JTextArea();
         JTextArea testTextArea = new JTextArea();
         //declare scroll bar for amortization table
         JScrollPane scrollPane = new JScrollPane(amortTextArea,ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
         public Workshop5()
              instructionLabel.setText("Choose one of the following payment calculation options:");
              instructionLabel.setFont(new Font("Tahoma",Font.PLAIN,16));
              //adds both buttons to button group     
              buttonGroup.add(enterRadioButton);
              buttonGroup.add(selectRadioButton);
              enterRadioButton.setFont(labelFont);
              enterRadioButton.setBackground(Color.WHITE);
              enterRadioButton.setContentAreaFilled(false);
             enterRadioButton.addActionListener(this); //adds action listener to enter radio button
              orLabel.setText("OR");
              orLabel.setFont(new Font("Tahoma",Font.BOLD,18));
              selectRadioButton.setFont(labelFont);
              selectRadioButton.setBackground(Color.WHITE);
              selectRadioButton.setContentAreaFilled(false);
              selectRadioButton.addActionListener(this); //adds action listener to select radio button
              amountLabel.setText("Enter mortgage amount");
              amountLabel.setFont(new Font("Tahoma", Font.PLAIN,16));
              amountField.requestFocusInWindow();
              termLabel.setText("Enter term length in years:");
              termLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
              rateLabel.setText("Enter interest rate:");
             rateLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
                comboBoxLabel.setText("Select a loan:");
             comboBoxLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
             comboBox.setBackground(new Color(255,255,255));
             comboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
             comboBox.setEnabled(false);
             ComboBox();
              calcLabel.setText("Press Calculate button to determine monthly payment.");
             calcLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
             calcButton.setText("Calculate");                    
             calcButton.setFont(new Font("Tahoma", Font.BOLD, 14));
             calcButton.addActionListener(this);
                //define monthly payment label
             paymentLabel.setText("Monthly payment:");
             paymentLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
             //define monthly payment text field
             paymentField.setFont(new Font("Tahoma", Font.BOLD,16));
             paymentField.setBackground(new Color(255,255,255));
             paymentField.setEditable(false); 
              //define clear button
              clearButton.setText("Clear"); 
              clearButton.setFont(new Font("Tahoma", Font.BOLD,14));
              clearButton.addActionListener(this);
              //define quit button
              quitButton.setText("Quit");
              quitButton.setFont(new Font("Tahoma", Font.BOLD,14));
              quitButton.addActionListener(this);         
              tableLabel.setText("Amoritization Table");
              tableLabel.setFont(new Font("Tahoma", Font.BOLD, 16));
              graphPane.setBackground(Color.WHITE);
              //add components to content     
              getContentPane().add(contentPane);
              contentPane.setLayout(null);
              addComponent(contentPane, instructionLabel, 80,10,450,26);
              addComponent(contentPane, enterRadioButton, 30,40,220,30);
              addComponent(contentPane, orLabel, 280,40,100,30);
              addComponent(contentPane, selectRadioButton, 335,40,350,30);
              addComponent(contentPane, amountLabel, 100,80,220,26);
              addComponent(contentPane, amountField, 300,80,150,26);
              addComponent(contentPane, termLabel, 15,125,200,30);
              addComponent(contentPane, termField, 195,125,125,30);
              addComponent(contentPane, rateLabel, 62,160,200,30);
              addComponent(contentPane, rateField, 195,165,125,30);
              addComponent(contentPane, comboBoxLabel, 400,125,200,26);
              addComponent(contentPane, comboBox, 400,155,150,30);
              addComponent(contentPane, calcLabel, 100,200,400,30);
              addComponent(contentPane, calcButton, 250,240,100,30);
              addComponent(contentPane, paymentLabel, 150,285,200,30);
              addComponent(contentPane, paymentField, 300,285,100,30);
              addComponent(contentPane, clearButton, 100,330,100,30);
              addComponent(contentPane, quitButton, 400,330,100,30);
              addComponent(contentPane, tableLabel, 200,370,300,26);
              addComponent(contentPane, scrollPane, 10,400,450,360);
              addComponent(contentPane, graphPane, 475,400,305,360);
              //add window listener to close window when user presses X
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)    
                        System.exit(0);
             pack();   
         //method to add components
         private void addComponent(Container container, Component c, int x, int y, int width, int height)
              c.setBounds(x, y, width, height);
              container.add(c);
         //action performed method
         public void actionPerformed(ActionEvent event)
              Object source = event.getSource();
              if (source == calcButton)
                   Calculate();
              if (source == clearButton)
                   Clear();
              if (source == quitButton)
                   Exit();
              //defines active area based on user selection of mortgage calculation method
               //if user chooses to enter the mortgage manually, combo box fields are inactive
               if (source == enterRadioButton)
                    comboBox.setEnabled(false);
                    termField.setEnabled(true);
                 termField.setEditable(true);
                 rateField.setEnabled(true);
                 rateField.setEditable(true);
                 amountField.setText("");
                   amountField.requestFocusInWindow();
                   termField.setText("");
                  rateField.setText("");
                  paymentField.setText("");
                  amortTextArea.setText("");
              //if user chooses to select from a preset mortgage, rate and term fields are inactive
              if (source == selectRadioButton)
                   comboBox.setEnabled(true);
                   termField.setEnabled(false);
                   termField.setEditable(false);
                   rateField.setEnabled(false);
                   rateField.setEditable(false);
                   amountField.setText("");
                   amountField.requestFocusInWindow();
                   termField.setText("");
                   rateField.setText("");
                   paymentField.setText("");
                   amortTextArea.setText("");
         }//end of action performed method
         //combo box method
          public void ComboBox()
               String[] LoanArray = {" 7 years at 5.35 %", " 15 years at 5.50 %", " 30 years at 5.75 %"};
               for (int i = 0; i < LoanArray.length; i++)
                    comboBox.addItem(LoanArray);
         }//end combo box method
         //calculation method
         void Calculate()
              //resets fields
              paymentField.setText("");
         amortTextArea.setText("");
              //calculation variables
         NumberFormat currency = NumberFormat.getCurrencyInstance();
              int [] termArray = {7, 15, 30};                               //array of years
                   double [] yearlyInterestArray = {5.35, 5.5, 5.75};           //array of interest
                   int totalMonths = 0;                                    //total months
                   double Loan = 0.0;                               //amount of loan
                   double MonthlyInterest = 0.0;                               //monthly interest rate
                   double Payment = 0.0;                               //calculate payment
                   double monthlyPayment = 0.0;                                   //calculate monthly payment
                   double Interest = 0.0;                                              //variable for Interest Array input
                   int Term = 0;                                              //variable for Term Array input
                   double NewMonthlyInterest = 0.0;                               //new interest amount
                   double NewLoan = 0.0;                               //new loan amount
                   double Reduction = 0.0;                               //principle reduction
                   //validate input
                   try
                        Loan = Double.parseDouble(amountField.getText());
                   catch (NumberFormatException e)
                        JOptionPane.showMessageDialog(null,"Invalid Entry. Please enter valid loan amount.", "Error", JOptionPane.WARNING_MESSAGE);
                   //resets input fields after error message
              amountField.setText("");
              amountField.requestFocusInWindow();
                   //if select button is chosen
              if (selectRadioButton.isSelected())
                   int index = comboBox.getSelectedIndex();
                   Term = termArray[index];
                   Interest = yearlyInterestArray[index];
              //if user chooses to enter mortgage information
              else
                   if (enterRadioButton.isSelected())
                        //validates input
              try
              Term = Integer.parseInt(termField.getText());
              catch (NumberFormatException e)
                   JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid term length in years.", "Error",JOptionPane.WARNING_MESSAGE);
                   //clears fields after error message
                   termField.setText("");
                   termField.requestFocusInWindow();
              try
                   Interest = Double.parseDouble(rateField.getText());
              catch (NumberFormatException e)
                   JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid rate (without percent symbol).","Error",JOptionPane.WARNING_MESSAGE);
              //clears fields after error message
              rateField.setText("");
                             rateField.requestFocusInWindow();
                   //perform calculations
                   if (Loan > 0)
                        Loan = Double.parseDouble(amountField.getText());
                        MonthlyInterest = (Interest / 12)/100;
                        totalMonths = Term * 12;
                        monthlyPayment = Loan * MonthlyInterest *(Math.pow((1 + MonthlyInterest), totalMonths)/(Math.pow((1 + MonthlyInterest), totalMonths)-1));
              paymentField.setText("" + currency.format(monthlyPayment));
                        //send information to amortization text area
                   amortTextArea.append("Number\t");
                   amortTextArea.append(" Amount\t");
                   amortTextArea.append("Interest\t");
                   amortTextArea.append("Principle\t");
                   amortTextArea.append("Balance\n");
              NewLoan = Loan;
                        for (int i = 1; i <= totalMonths; i++)
                             NewMonthlyInterest = MonthlyInterest * NewLoan;
                             Reduction = monthlyPayment - NewMonthlyInterest;
                             NewLoan = NewLoan - Reduction;
                             amortTextArea.append(" " + i +"\t");
                             amortTextArea.append(" " + currency.format(monthlyPayment) + "\t");
                             amortTextArea.append(" " + currency.format(NewMonthlyInterest)+ "\t");
                             amortTextArea.append(" " + currency.format(Reduction) + "\t");
                             amortTextArea.append(" " + currency.format(NewLoan) + "\n");
                        //resets fields if loan amount is less than zero
                        if((Loan <= 0 || Term <= 0 || Interest <= 0))
                             paymentField.setText("");
                             amortTextArea.setText("");
         }//end calcualtion method
         //clear method
         void Clear()
              amountField.setText("");
              amountField.requestFocusInWindow();
              termField.setText("");
              rateField.setText("");
              paymentField.setText("");
              amortTextArea.setText("");
         }//end of clear method
         //main method
         public static void main(String args[])
              Workshop5 f = new Workshop5();
              f.setTitle("Carol's Mortgage Calculator");
              f.setBounds(200,100,800,800);
              f.setResizable(false);
              f.setVisible(true);
         }//end of main method
         //exit method
         void Exit()
              System.exit(0);
         }//end of exit method
    }//program end
    My data file is called: "InterestData.dat" and only contains the following text:
    5.35, 5.5, 5.75

    Ok, now I am getting this error message:
    cannot resolve symbol method lenght()
    Please help me out here, this is due tomorrow and I've been killing myself on it...
    attaching program with revised code included, see beginning of calculation method line 250:
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.* ;
    import java.text.NumberFormat;
    import java.text.DecimalFormat;
    import java.io.*;
    import javax.swing.JOptionPane;
    public class Workshop5 extends JFrame implements ActionListener
         //declare gui components
        //declare labels
        JPanel contentPane = new JPanel();
         JPanel graphPane = new JPanel();
         JLabel instructionLabel = new JLabel();
            JLabel amountLabel = new JLabel();
        JLabel orLabel = new JLabel();
        JLabel comboBoxLabel = new JLabel();
        JLabel termLabel = new JLabel();
        JLabel rateLabel = new JLabel();
        JLabel calcLabel = new JLabel();
        JLabel paymentLabel = new JLabel();
        JLabel tableLabel = new JLabel();
        //declare font object
        Font labelFont = new Font("Tahoma", Font.PLAIN, 16);
        //declare text fields
        JTextField amountField = new JTextField(20);
        JTextField termField = new JTextField(20);
        JTextField rateField = new JTextField(20);
        JTextField paymentField= new JTextField(20);
        //declare combo box for loan selection
        JComboBox comboBox = new JComboBox();
            //declare button group and radio buttons
            ButtonGroup buttonGroup = new ButtonGroup();
            JRadioButton enterRadioButton = new JRadioButton("Enter amount, term, & rate", true);
            JRadioButton selectRadioButton = new JRadioButton("Select a preset term/rate loan", false);
        //declare button objects
        JButton clearButton = new JButton();
            JButton calcButton = new JButton();
            JButton quitButton = new JButton();
        //declare text area for amortization
        JTextArea amortTextArea = new JTextArea();
        JTextArea testTextArea = new JTextArea();
        //declare scroll bar for amortization table
        JScrollPane scrollPane = new JScrollPane(amortTextArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
         public Workshop5()
             instructionLabel.setText("Choose one of the following payment calculation options:");
            instructionLabel.setFont(new Font("Tahoma",Font.PLAIN,16));
            //adds both buttons to button group
            buttonGroup.add(enterRadioButton);
            buttonGroup.add (selectRadioButton);
            enterRadioButton.setFont(labelFont);
            enterRadioButton.setBackground(Color.WHITE);
            enterRadioButton.setContentAreaFilled(false);
            enterRadioButton.addActionListener(this); //adds action listener to enter radio button
            orLabel.setText("OR");
            orLabel.setFont(new Font("Tahoma",Font.BOLD,18));
            selectRadioButton.setFont(labelFont);
            selectRadioButton.setBackground(Color.WHITE);
            selectRadioButton.setContentAreaFilled(false);
            selectRadioButton.addActionListener (this); //adds action listener to select radio button
              amountLabel.setText("Enter mortgage amount");
            amountLabel.setFont(new Font("Tahoma", Font.PLAIN,16));
            amountField.requestFocusInWindow();
            termLabel.setText("Enter term length in years:");
            termLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
            rateLabel.setText("Enter interest rate:");
            rateLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
            comboBoxLabel.setText("Select a loan:");
            comboBoxLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
            comboBox.setBackground(new Color(255,255,255));
            comboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
            comboBox.setEnabled(false);
            ComboBox();
            calcLabel.setText("Press Calculate button to determine monthly payment.");
            calcLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
            calcButton.setText("Calculate");
            calcButton.setFont(new Font("Tahoma", Font.BOLD, 14));
            calcButton.setBackground(new Color(202,255,112));
            calcButton.addActionListener(this);
            //define monthly payment label
            paymentLabel.setText("Monthly payment:");
            paymentLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
            //define monthly payment text field
            paymentField.setFont (new Font("Tahoma", Font.BOLD,16));
            paymentField.setBackground(new Color(255,255,255));
            paymentField.setEditable(false);
              //define clear button
            clearButton.setText("Clear");
            clearButton.setFont(new Font("Tahoma", Font.BOLD,14));
            clearButton.setBackground(new Color(202,255,112));
            clearButton.addActionListener(this);
            //define quit button
            quitButton.setText("Quit");
            quitButton.setFont(new Font("Tahoma", Font.BOLD,14));
            quitButton.setBackground(new Color(202,255,112));
            quitButton.addActionListener(this);
              //define label for amortization table
            tableLabel.setText ("Amoritization Table");
              tableLabel.setFont(new Font("Tahoma", Font.BOLD, 16));
            graphPane.setBackground(Color.WHITE);
            //add components to content
            getContentPane().add(contentPane);
            contentPane.setLayout(null);
              addComponent(contentPane, instructionLabel, 80,10,450,26);
            addComponent(contentPane, enterRadioButton, 30,40,220,30);
            addComponent(contentPane, orLabel, 280,40,100,30);
            addComponent(contentPane, selectRadioButton, 335,40,350,30);
            addComponent(contentPane, amountLabel, 100,80,220,26);
            addComponent(contentPane, amountField, 300,80,150,26);
            addComponent(contentPane, termLabel, 15,125,200,30);
            addComponent(contentPane, termField, 195,125,125,30);
            addComponent(contentPane, rateLabel, 62,160,200,30);
            addComponent(contentPane, rateField, 195,165,125,30);
            addComponent(contentPane, comboBoxLabel, 400,125,200,26);
            addComponent(contentPane, comboBox, 400,155,150,30);
            addComponent(contentPane, calcLabel, 100,200,400,30);
            addComponent(contentPane, calcButton, 250,240,100,30);
            addComponent(contentPane, paymentLabel, 150,285,200,30);
            addComponent(contentPane, paymentField, 300,285,100,30);
            addComponent(contentPane, clearButton, 100,330,100,30);
            addComponent(contentPane, quitButton, 400,330,100,30);
            addComponent(contentPane, tableLabel, 200,370,300,26);
            addComponent(contentPane, scrollPane, 10,400,450,360);
            addComponent(contentPane, graphPane, 475,400,305,360);
            //add window listener to close window when user presses X
            addWindowListener(new WindowAdapter()
                 public void windowClosing(WindowEvent e)
                      System.exit(0);
            pack();
           //method to add components
           private void addComponent(Container container, Component c, int x, int y, int width, int height)
                   c.setBounds(x, y, width, height);
                   container.add(c);
           //action performed method
           public void actionPerformed(ActionEvent event)
                   Object source = event.getSource();
                   if (source == calcButton)
                           Calculate();
                   if (source == clearButton)
                           Clear();
                   if (source == quitButton)
                           Exit();
                   //defines active area based on user selection of mortgage calculation method
                   //if user chooses to enter the mortgage manually, combo box fields are inactive
                   if (source == enterRadioButton)
                           comboBox.setEnabled(false);
                           termField.setEnabled(true);
                   termField.setEditable(true);
                   rateField.setEnabled(true);
                   rateField.setEditable(true);
                   amountField.setText ("");
                           amountField.requestFocusInWindow();
                           termField.setText("");
                       rateField.setText("");
                       paymentField.setText ("");
                       amortTextArea.setText("");
                   //if user chooses to select from a preset mortgage, rate and term fields are inactive
                   if (source == selectRadioButton)
                           comboBox.setEnabled(true);
                           termField.setEnabled(false);
                           termField.setEditable(false);
                           rateField.setEnabled (false);
                           rateField.setEditable(false);
                           amountField.setText("");
                           amountField.requestFocusInWindow();
                           termField.setText ("");
                           rateField.setText("");
                           paymentField.setText("");
                           amortTextArea.setText("");
           }//end of action performed method
           //combo box method
            public void ComboBox()
                   String[] LoanArray = {" 7 years at 5.35 %", " 15 years at 5.50 %", " 30 years at 5.75 %"};
                   for (int i = 0; i < LoanArray.length; i++)
                           comboBox.addItem(LoanArray);
    }//end combo box method
    //calculation method
         void Calculate()
              //resets fields
              paymentField.setText("");
              amortTextArea.setText("");
              //calculation variables
              NumberFormat currency = NumberFormat.getCurrencyInstance();
              //declare input stream object
              InputStream istream;
              //create a file object to refer to the outside file
              File interestData = new File("InterestFile.dat");
              //assign instream to the new file object
              istream = new FileInputStream(interestData);
              try
                   StringBuffer sb = new StringBuffer();
                   BufferedReader in = new BufferedReader(new FileReader(interestData));
                   String line = "";
                   while((line = in.readLine()) != null)
                        sb.append(line);
                   in.close();
                   String fileData = sb.toString();
                   String[] splitData = fileData.split(", ");
                   double [] yearlyInterestArray = new double[splitData.length()];
                   for(int j = 0; j < splitData.length(); j++)
                        yearlyInterestArray[j] = new Double(splitData[j]).doubleValue();
              catch (IOException e)
                   JOptionPane.showMessageDialog(null, "File does not exist." + e.getMessage());
              int [] termArray = {7, 15, 30}; //array of years
              double [] yearlyInterestArray = { 5.35, 5.5, 5.75}; //array of interest
              int totalMonths = 0; //total months
              double Loan = 0.0; //amount of loan
              double MonthlyInterest = 0.0; //monthly interest rate
              double Payment = 0.0; //calculate payment
    double monthlyPayment = 0.0; //calculate monthly payment
    double Interest = 0.0; //variable for Interest Array input
    int Term = 0; //variable for Term Array input
    double NewMonthlyInterest = 0.0; //new interest amount
    double NewLoan = 0.0; //new loan amount
    double Reduction = 0.0; //principle reduction
    //validate input
    try
         Loan = Double.parseDouble(amountField.getText());
    catch (NumberFormatException e)
         JOptionPane.showMessageDialog(null,"Invalid Entry. Please enter valid loan amount.", "Error", JOptionPane.WARNING_MESSAGE);
    //resets input fields after error message
    amountField.setText("");
    amountField.requestFocusInWindow ();
              //if select button is chosen
              if (selectRadioButton.isSelected())
                   int index = comboBox.getSelectedIndex ();
                   Term = termArray[index];
                   Interest = yearlyInterestArray[index];
              //if user chooses to enter mortgage information
              else
                   if (enterRadioButton.isSelected())
              //validates input
              try
                   Term = Integer.parseInt(termField.getText());
    catch (NumberFormatException e)
         JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid term length in years.", "Error",JOptionPane.WARNING_MESSAGE);
         //clears fields after error message
         termField.setText("");
         termField.requestFocusInWindow();
    try
         Interest = Double.parseDouble(rateField.getText());
    catch (NumberFormatException e)
         JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid rate (without percent symbol).","Error",JOptionPane.WARNING_MESSAGE);
         //clears fields after error message
         rateField.setText("");
         rateField.requestFocusInWindow();
              //perform calculations
              if (Loan > 0)
                   Loan = Double.parseDouble(amountField.getText ());
                   MonthlyInterest = (Interest / 12)/100;
                   totalMonths = Term * 12;
                   monthlyPayment = Loan * MonthlyInterest *(Math.pow ((1 + MonthlyInterest), totalMonths)/(Math.pow((1 + MonthlyInterest), totalMonths)-1));
    paymentField.setText("" + currency.format(monthlyPayment));
    //send information to amortization text area
    amortTextArea.append("Number\t");
    amortTextArea.append(" Amount\t");
    amortTextArea.append("Interest\t");
    amortTextArea.append("Principle\t");
    amortTextArea.append("Balance\n");
                   NewLoan = Loan;
                   for (int i = 1; i <= totalMonths; i++)
         NewMonthlyInterest = MonthlyInterest * NewLoan;
         Reduction = monthlyPayment - NewMonthlyInterest;
         NewLoan = NewLoan - Reduction;
         amortTextArea.append(" " + i +"\t");
         amortTextArea.append (" " + currency.format(monthlyPayment) + "\t");
         amortTextArea.append(" " + currency.format(NewMonthlyInterest)+ "\t");
         amortTextArea.append(" " + currency.format(Reduction) + "\t");
         amortTextArea.append(" " + currency.format(NewLoan) + "\n");
    //resets fields if loan amount is less than zero
    if((Loan <= 0 || Term <= 0 || Interest <= 0))
         paymentField.setText("");
         amortTextArea.setText("");
         }//end calcualtion method
    //clear method
    void Clear()
    amountField.setText("");
    amountField.requestFocusInWindow();
    termField.setText("");
    rateField.setText("");
    paymentField.setText("");
    amortTextArea.setText("");
    }//end of clear method
    //main method
    public static void main(String args[])
    Workshop5 f = new Workshop5();
    f.setTitle("Carol's Mortgage Calculator");
    f.setBounds(200,100,800,800);
    f.setResizable(false);
    f.setVisible(true);
    }//end of main method
    //exit method
    void Exit()
    System.exit(0);
    }//end of exit method
    }//program end

  • Need help - script to continue text in another field if necessary

    Wish I could attach my form but it's not available. I am using Adobe Acrobat 9.0. I have a form with two text fields for "Other" information that needs to be shared. If the user types in more characters than the box holds the overflow text doesn't print. These are court documents and all the text has to print somehow. I am trying to figure out a work around for this and wondered if a script can be written to put the extra text from each "Other" field into another field that would open on a new page at the end of the document if necessary. I want to avoid having extra empty pages however so if they can be added ONLY if the text needs to overflow. I hope I explained this okay, like I said I wanted to upload the form but can't. If someone can help me with this I would really appreciate it.

    LiveCycle is a part of Acrobat Pro Extended - Windows users only, not Mac.
    OctRita wrote:
    … would it be possible to have a page at the end with a text field for each of the ones that need overflow to print and can a javascript be written to put the extra text into those fields?
    Yes, it is possible - I've already indirectly provided you with the code for that via the link in my post. Just remember to save it to your desktop:
    http://www.adirect.dk/adobeforum/commentfields.pdf
    As an alternative you could remove the limited characters, set the field to multiline and make a script that set the textsize to auto if the user fills the field with text. When textsize is set to auto, the text will keep on shrinking as user types more text.
    Torben.

  • Need help regarding the dunning form

    Hi,
    I have to display all the sales and payments of a cusomter for all the periods that are older than the run date in a dunning form. (i.e) if the run date is 04-aug-05 and if the slaes are there in 3 months(april, May, july) then i have to display three line items with sales and payments for that corresponding three months in the line items. As this is a dunning form i cannot change the print program. any table which have all the sales for a period which i can access directly in the script. can anyone suggest how to handle this.
    regards,
    Asha

    Hi,
    You can call a subroutine within a program (your z program)
    /:   PERFORM ADD_AMOUNT IN PROGRAM SAPLZFTP_F150
    /:           USING &W_AMOUNT&
    /:   ENDPERFORM
    In the z program create this subroutine.
          Form ADD_AMOUNT
         -->FT_INVAR  Text Symbol table for input  variables
         -->FT_OUTVAR Text Symbol table for output variables
    FORM add_amount TABLES ft_invar   STRUCTURE itcsy
                           ft_outvar  STRUCTURE itcsy.
      STATICS:
        w_value_l    TYPE  f150d-salfw.
            READ TABLE ft_invar INDEX 1.
            IF sy-subrc IS INITIAL.
    you can check all this part of the code how you want to
    process your data whether its numeric or character or
    whatever
               w_value_l = w_value_l + ft_invar-value.
            ENDIF. "IF sy-subrc IS INITIAL.
    ENDFORM.                    " ADD_AMOUNT
    TO BESPOKE THE PRINT PROGRAM FOR THE DUNNING
    Dunning outputs use the function module FI_DUNNING_PRINT_NOTICE. You can copy this to a Z function module and make some changes to the data selection. You will have to look into the code and decide what changes you need.
    The process to use a bespoke program to do the dunning print is as follows:
    UNDER FI GLOBAL SETTINGS in the configuration,
    There are Business Transaction Events. Within that you can configure the same to enable a Z function module in place of the standard function module (from the FUNCTION GROUP F150)
    • Create function group ZFTP_F150
    • Copy standard function module FI_PRINT_DUNNING_NOTICE of function group F150 to ZFTP_FI_PRINT_DUNNING_NOTICE in function group ZFTP_F150
    • Copy standard function module PRINT_DUNNING_NOTICE of function group F150 to ZFTP_PRINT_DUNNING_NOTICE in function group ZFTP_F150
    • Within the function module ZFTP_FI_PRINT_DUNNING_NOTICE, change function module call for PRINT_DUNNING_NOTICE to ZFTP_PRINT_DUNNING_NOTICE
    • Create a new include ZFTPI_ROUTINES within the function group and copy the subroutines LOG_MSG, LOG_MSG_TAB, & LOG_SYMSG from the function group F150 to this include
    AS AN ALTERNATE, YOU CAN COPY THE WHOLE FUNCTION GROUP
    • Maintenance view TBE31 (SM30). Change the function module from FI_PRINT_DUNNING_NOTICE to ZFTP_FI_PRINT_DUNNING_NOTICE against the event 00001720 FI-FI entry
    Hope this helps.
    regards,
    Satya

  • Need help with check out form - Payment method error

    When I check out error comes up "Payment Method must be selected" though it is.
    The 30 day account option works but Credit cards get the above error.
    Anyone able to help me?
    Andrew
    <h1>Checkout</h1>
    <p class="required-h1-tip"><span>*</span> Required field</p>
    <p>Please fill out the required fields, delivery address and payment fields.</p>
    <hr />
    <section class="checkout form-container">
    <form name="catwebformform42059" class="form-generic-a checkout-a" id="catwebformform42059" onsubmit="return checkWholeForm42059(this)" action="/FormProcessv2.aspx?WebFormID=10850&amp;OID={module_oid}&amp;OTYPE={module_otype} &amp;EID={module_eid}&amp;CID={module_cid}" enctype="multipart/form-data" method="post">
        <fieldset>
        <h2 class="a">1. Account Information</h2>
        <!--<div class="row">
        <p class="field field-a">
        <label for="username">User Name <em>*</em></label>
        <input type="text" value="{module_username}" id="f-username" class="text" name="UserName" />
        </p>
        <p class="field field-b">
        <label for="password">Password <em>*</em></label>
        <span class="half">
        <input type="password" value="{module_password}" id="f-password" class="text" name="Password" />
        </span></p>
        <p class="field field-b">
        <label for="confirm-password">Confirm <em>*</em></label>
        <span class="half">
        <input type="password" value="{module_password}" id="f-password-confirm" class="text" name="PasswordConfirm" />
        </span></p>
        </div>-->
        <div class="row">
        <p class="field field-a">
        <label for="first-name">First Name <em>*</em></label>
        <input type="text" name="FirstName" class="text" id="f-first-name" value="{module_firstname}" />
        </p>
        <p class="field field-a">
        <label for="last-name">Last Name <em>*</em></label>
        <input type="text" name="LastName" class="text" id="LastName" value="{module_lastname}" />
        </p>
        </div>
        <div class="row">
        <p class="field field-a">
        <label for="email">Email Address <em>*</em></label>
        <input type="text" name="EmailAddress" class="text" id="f-email" value="{module_emailaddress}" />
        </p>
        <p class="field field-a">
        <label for="phone">Phone Number <em>*</em></label>
        <input type="text" name="HomePhone" class="text" id="f-phone" value="{module_homephone}" />
        </p>
        </div>
        <div class="row checkbox"><span class="tick">
        <input type="checkbox" name="CampaignList_20945" class="tick" id="f-updates" />
        </span>
        <label for="newsletter-a">Keep me up to date on product information, sales, and special offerings.</label>
        </div>
        </fieldset>
        <hr />
        <fieldset>
        <h2 class="a">2. Shipping Address</h2>
        <div class="row">
        <p class="field field-a">
        <label for="ShippingAttention">Shipping Name: <em>*</em></label>
        <input type="text" class="text" id="ShippingAttention" name="ShippingAttention" />
        </p>
        </div>
        <div class="row">
        <p class="field field-a">
        <label for="shipping-addr-1">Address Line 1 <em>*</em></label>
        <input type="text" class="text" id="ShippingAddress" name="ShippingAddress" />
        </p>
        <p class="field field-a">
        <label for="shipping-addr-2">Address Line 2</label>
        <input type="text" class="text" id="ShippingAddress2" name="ShippingAddress2" />
        </p>
        </div>
        <div class="row">
        <p class="field field-a">
        <label for="shipping-city">City <em>*</em></label>
        <input type="text" class="text" id="ShippingCity" name="ShippingCity" />
        </p>
        <p class="field field-a">
        <label for="shipping-state">State <em>*</em></label>
        <input type="text" class="text" id="ShippingState" name="ShippingState" />
        </p>
        </div>
        <div class="row">
        <div class="field field-a">
        <p class="field-b">
        <label for="ShippingZip">Zip / Postal Code <em>*</em></label>
        <input type="text" class="text" id="ShippingZip" name="ShippingZip" />
        </p>
        </div>
        <!--  <p class="field field-a">
                        <label for="shipping-phone">Phone Number <em>*</em></label>
                        <input type="text" id="shipping-phone" name="shipping-phone" />
                    </p> -->
        </div>
        </fieldset>
        <hr />
        <fieldset>
        <h2 class="a">3. Billing Address</h2>
        <div class="row checkbox"><span class="tick">
        <input type="checkbox" class="tick" value="1" id="f-shipping-same" name="same_shipping" />
        </span>
        <label for="billing-same-as-shipping">Check this box if billing address is the same as shipping address.</label>
        </div>
        <div class="row">
        <p class="field field-a">
        <label for="billing-addr-1">Address Line 1 <em>*</em></label>
        <input type="text" value="{module_homeaddress}" id="BillingAddress" class="text" name="BillingAddress" />
        </p>
        <p class="field field-a">
        <label for="billing-addr-2">Address Line 2 <em>*</em></label>
        <input type="text" class="text" id="BillingAddress2" name="BillingAddress2" />
        </p>
        </div>
        <div class="row">
        <p class="field field-a">
        <label for="billing-city">City <em>*</em></label>
        <input type="text" value="{module_homecity}" id="BillingCity" class="text" name="BillingCity" />
        </p>
        <p class="field field-a">
        <label for="billing-state">State <em>*</em></label>
        <input type="text" value="{module_homestate}" id="BillingState" class="text" name="BillingState" />
        </p>
        </div>
        <div class="row">
        <p class="field field-b">
        <label for="BillingZip">Zip / Postal Code <em>*</em></label>
        <input type="text" value="{module_homezip}" id="BillingZip" class="text" name="BillingZip" />
        </p>
        </div>
        </fieldset>
        <hr />
        <fieldset id="credit-card-information">
        <h2 class="a">4. Payment Options</h2>
        <div class="row">
        <h4>Approved 30 DayAccount Customer</h4>
        <p class="field">Please select   
        </p>
        <input type="radio" name="PaymentMethodType" id="PaymentMethodType" value="8" /><span style="font-size: 18px; color: #ffff00;">Account Customers Only</span><hr />
        <h2>Pay by Credit Card</h2>
        <p class="row row-accepted-cards">
        We accept the following credit cards: <img alt="" src="temp/cards.png" />            </p>
        <label for="card-type">Card Type <em>*</em></label>
        <span class="select">
        <select name="CardType" class="text" id="f-cc-type">
        <option selected="selected" value="1">Visa</option>
        <option value="2">Master Card</option>
        <option value="4">American Express</option>
        </select>    </span>
        </div>
        <div class="row">
        <p class="field field-a">
        <label for="name-on-card">Name on Card <em>*</em></label>
        <input type="text" name="CardName" class="text" id="f-cc-name" />
        </p>
        <p class="field field-a">
        <label for="card-number">Card Number <em>*</em></label>
        <input type="text" name="CardNumber" class="text" id="f-cc-number" />
        </p>
        </div>
        <div class="row">
        <p class="field card-expiration">
        <label for="card-exp-month">Card Expiration <span class="offset">Month</span> <em>*</em></label>
        <span class="select one">
        <select name="CardExpiryMonth" class="s" id="f-cc-exp-month">
        <option selected="selected" value="1">January</option>
        <option value="2">February</option>
        <option value="3">Mar</option>
        <option value="4">Apr</option>
        <option value="5">May</option>
        <option value="6">Jun</option>
        <option value="7">Jul</option>
        <option value="8">Aug</option>
        <option value="9">Sep</option>
        <option value="10">Oct</option>
        <option value="11">Nov</option>
        <option value="12">Dec</option>
        </select>
        </span>
        <label class="offset" for="card-exp-year">Card Expiration Year<em>*</em></label>
        <span class="select">
        <select name="CardExpiryYear" class="xs" id="f-cc-exp-year">
        <option value="2015">2015</option>
        <option value="2016">2016</option>
        <option value="2017">2017</option>
        <option value="2018">2018</option>
        <option value="2019">2019</option>
        <option value="2020">2020</option>
        <option value="2021">2021</option>
        <option value="2022">2022</option>
        </select>
        </span></p>
        </div>
        <div class="row">
        <div style="display: none;">
        <input type="radio" name="PaymentMethodType" class="tick" id="f-payment-method-cc" value="1" />
        <input type="radio" name="PaymentMethodType" id="PaymentMethodType_9" value="10" />
        </div>
        </div>
        <div class="row">
        <p class="field ccvn">
        <label for="ccv-number">CCV Number <em>*</em></label>
        <span class="ccv">
        <input type="text" name="CardCCV" class="text" id="f-cc-cvv" />
        </span></p>
        </div>
        </fieldset>
        <div class="wrap total">
        <p class="sum">Total: <strong><span class="amountSpan"></span></strong></p>
        <p class="action"><button class="button-a" type="submit">Checkout</button></p>
        </div>
        <input type="hidden" name="Amount" class="cat_textbox" id="Amount" readonly="readonly" />
        <script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js"></script>
        <script language="javascript" type="text/javascript">
                //<![CDATA[
                var submitcount42059 = 0;function checkWholeForm42059(theForm){var why = "";if (theForm.Username) why += isEmpty(theForm.Username.value, "Username"); if (theForm.Password && theForm.PasswordConfirm) { why += isEmpty(theForm.Password.value, "Password"); why += isEmpty(theForm.PasswordConfirm.value, "Confirm Password"); if (theForm.Password.value != theForm.PasswordConfirm.value) why += appendBreak("- Password and its confirmation do not match."); if (theForm.Password.value.length < 6) why += appendBreak("- Password must be 6 characters or longer."); }if (theForm.FirstName) why += isEmpty(theForm.FirstName.value, "First Name"); if (theForm.LastName) why += isEmpty(theForm.LastName.value, "Last Name"); if (theForm.HomePhone) why += isEmpty(theForm.HomePhone.value, "Phone Number"); if (theForm.EmailAddress) why += checkEmail(theForm.EmailAddress.value);if (theForm.ShippingAttention) why += isEmpty(theForm.ShippingAttention.value, "Shipping Name");if (theForm.ShippingAddress) why += isEmpty(theForm.ShippingAddress.value, "Shipping Address"); if (theForm.HomePhone) why += isEmpty(theForm.HomePhone.value, "Phone Number"); if (theForm.ShippingState) why += isEmpty(theForm.ShippingState.value, "Shipping State");  if (theForm.ShippingCity) why += isEmpty(theForm.ShippingCity.value, "Shipping City");  if (theForm.ShippingZip) why += isEmpty(theForm.ShippingZip.value, "Shipping Zipcode");
                if (theForm.BillingAddress) why += isEmpty(theForm.BillingAddress.value, "Billing Address");  if (theForm.BillingState) why += isEmpty(theForm.BillingState.value, "Billing State");  if (theForm.BillingCity) why += isEmpty(theForm.BillingCity.value, "Billing City");  if (theForm.BillingZip) why += isEmpty(theForm.BillingZip.value, "Billing Zipcode");
                 if (!theForm.PaymentMethodType || getRadioSelected(theForm.PaymentMethodType) == 1) { if (theForm.CardName) why += isEmpty(theForm.CardName.value, "Name on Card"); if (theForm.CardNumber) why += isNumeric(theForm.CardNumber.value, "Card Number"); if (theForm.Amount) why += isCurrency(theForm.Amount.value, "Amount"); } if (theForm.PaymentMethodType) why += checkSelected(theForm.PaymentMethodType, "Payment Method");if(why != ""){alert(why);return false;}if(submitcount42059 == 0){submitcount42059++;theForm.submit();return false;}else{alert("Form submission is in progress.");return false;}}
                // Credit Card info is not required if paying by PayPal, Hosted Credit Card, COD etc
                function ShowCCFields(val) {                           
                    if (!document.getElementById('paymentdiv'))
                        return;         
                    if (val != 1)
                        document.getElementById('paymentdiv').style.display = 'none';               
                    else
                        document.getElementById('paymentdiv').style.display = 'inline';
                //]]>
            </script>
    </form>
    </section>

    Locking this thread.
    You only need one post on something

  • Need Help scripting Multiple Dependencies to show hidden subform.

    I'm trying to make it so two boxes have to be checked to show a hidden subform.  I thought the script would be something like this:
    if (Check1.rawValue==1)
    && (Check2.rawValue==1){
    Sub1.presence="visible";
    else{
    Sub1.presence="hidden";
    It's not working at all though, so I'm obviously mistaken in my logic.
    I'm using LiveCycle Designer ES 8.2.1.
    Any help is greatly appreciated.  Kind of a stand still until I get this one figured out, otherwise I have to change how my document will be designed.  Thanks.
    Mike

    I don't have LiveCycle but you from a javascript standpoint yuo might not need all those parenthesis in your if statement. Try:
    if ( Check1.rawValue == 1 && Check2.rawValue == 1 ) {
         Sub1.presence = "visible";
    } else {
         Sub1.presence= "hidden";
    That is assuming that the "Check1", "Check2" and "Sub1" variables are setup to properly reference your live cycle form elements. If those variables are right then my if statement above should work for you.
    If this still doesn't work for you, you might try posting this in the LiveCycle forums: http://forums.adobe.com/community/livecycle

Maybe you are looking for

  • Error Message when opening Apps in PSE10

    I don't have any issues opening external Apps such as IPhoto, PSE Organizer, ACDSee outside of PSE10.  All of my photo's and elements are stored on these three programs and work fine on their own. However when I open PSE10 and try to open and access

  • Set funcitonal area in new PO line item

    We are trying to re-trigger the derivation of the functional area when a new PO line item is created using the <Copy PO line item> function.  Using standard SAP functionality and changing the delivery date, the functional area associated with the new

  • IE 10 and 11 can't display Google Chrome's landing page correctly in RTL languages (Hebrew, Arabic, Persian)

    Hi, I've been trying to download Google Chrome from the official Hebrew version website (https://www.google.co.il/chrome/) Using IE11 on Windows 7 SP1 from different computer setups, but every time the blue download box-link simply didn't show up. I'

  • Different ISBN for iBooks standard, and iBooks author?

    Hey guys, Submitting regular iBook and iBooks author edition. It was suggested by Apple to use 'Extended" in the title, to clarify that the two editions are different. Cool beans, BUT, do I need an individual ISBN for each version? Big thanks for you

  • Launcing books on ibooks

    i purchased  book from Appstore, but could not launch it on iBooks. The book kept dissapering as soon as i click on it on the shelf