Need Help With Check Box count Script

Need to count the number of checked boxes. I'm using the script below and its not working. What I'm I doing wrong? It's driving me crazy.
// document level function to sum named fields
function Sum(aFieldNames) {
var sum = 0; // sum of values
// loop through fields
for (var i = 0; i < aFieldNames.length; i++) {
if(!isNaN(this.getField(aFieldNames[i]).value) )
sum += Number(this.getField(aFieldNames[i]).value);
return sum;
} // end of Sum function
// array of field names sum
var aCheckBox = new Array('Check Box5', 'Check Box8', 'Check Box11', 'Check Box16', 'Check Box19','Check Box22', 'Check Box25','Check Box28', 'Check Box31', 'Check Box34','Check Box37', 'Check Box40','Check Box43', 'Check Box46', 'Check Box49','Check Box52', 'Check Box55','Check Box58', 'Check Box61', 'Check Box64','Check Box68');
// sum named fields
event.value = Sum(aCheckBox);

Then why are you checking if they're a number by using the isNaN function, and then trying to add that number to the sum variable? It looks like you just copied the code from somewhere else, even though it doesn't apply to your situation.
Replace those two lines of the code with this:
if (this.getField(aFieldNames[i]).value!="Off") sum++;

Similar Messages

  • Hi! I am newbie to Reports need help with check boxes

    Hi! I am newbie to Reports need help with check boxes. I am try-in to make a new check boxes that will validate in runtime. I have created two frames and one frame is dummy and other frame has big X line on it with conditions. Is this a right way to create check box! Please help thanks!

    and one frame is dummy and other frame has big X
    line on it with conditions. Is this a right way to
    create check box! Please help thanks!Instead of creating a frame for X, you can create Ractangle and place X in it. Rest is fine.

  • 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

  • Flash Newbie needs help with Movie Clips/Action Scripting

    Hi -
    I'm having a problem with my movie clips playing
    simultaneously and cannot, for the life of me, figure out what I
    have done wrong. I'm new to flash, so I may have set something up
    incorrectly, but here's what I have so far:
    11 layers, total: 1 layer with 10 control buttons, each
    button with the following actionscript:
    on (release) {
    gotoAndPlay(85);
    Where the number changes in relation to which keyframe the
    next movie is on.
    I have 10 movies, total, but they are only movie clips,
    essentially photo slide shows with audio, made all in the library.
    The problem happens when I click on the second or third
    button. Not only does the movie that I have selected begin to play,
    but all of the previous clips do as well, so it all sounds quite
    garbled. I don't know what I am missing in the action script, as my
    Action Layer has a stop command on it at each keyframe where there
    is a new clip to play.
    I have tried to add a stopAllSounds command, but I'm afraid
    that doesn't do anything because it is not a "sound file" per se,
    playing in the timeline.
    I'm at the end of my rope and really need some help in
    figuring this one out. My project is hanging in the balance on
    this, as I have scripted everything else correctly and it runs
    beautifully.
    Please help!
    Thanks,
    Caroline

    Each layer has a blank keyframe before and after each
    movieclip. Each movie clip is at a different frame. Even with the
    blank keyframes added, the second video starts to play and then the
    first video begins to play. Same happens if I click on the third
    button. Third plays, and starts 1st and 2nd shortly thereafter. Is
    there an action script I can put in that will tell the timeline
    that, when a button is clicked, no matter where the movieclip is,
    it will stop and start the newly selected movieclip?

  • Need help with IE6 box drop problem DW CS4

    Having a problem with this page: http://www.recoverings.com/tarzan.html in IE6. Maincontent drops below the sidebar menu. Looks fine in FF, Safari, IE7.
    All other pages work well. I assume that this has something to do with the width of the .wrapnail and .thumbnail divs, but reducing the margins doesn't seem to help and the images start to get too close together. What am I missing here?
    Can someone help me solve this?
    I would also appreciate any suggestions on cleaning up my CSS. Seems like I have an awful lot of stuff in there. Maybe it's okay but could it be cleaner?
    Thanks for your help,
    Phil

    IE bug Float Drop is fairly common.  Make sure your page wrapper division is wider than the combined width of left sidebar + main content + left & right borders if any.  If that doesn't help, add an overflow: hidden rule to your floated container and make sure you have cleared both floats.
    More about float drop and the expanding box problem can be found here:
    http://www.positioniseverything.net/explorer/expandingboxbug.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics |  Print | Media Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Need Help with checking of 2 queries

    hi,
    I dunno how to check for query that needs 2 of the table component in order to display.
    I need to check for this:
    private void _init() throws Exception {
    weekly_datesDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{SessionBean1.weekly_datesRowSet}"));
    progress_reportRowSet.setDataSourceName("java:comp/env/jdbc/Projectinfo");
    progress_reportRowSet.setCommand("SELECT ALL progress_report.ADM_NO, \n progress_report.WEEK_NO, \n progress_report.OBJECTIVE_SET, \n progress_report.OBJECTIVE_ACHIEVED, \n progress_report.SUPERVISOR_COMMENTS, \n progress_report.STATUS_CODE, \n progress_report.PART2_SUBMISSION_DATE, \n progress_report.APPROVAL_DATE, \n student.ADM_NO, \n student.ID_NO, \n student.PASSWORD, \n weekly_dates.WEEK_NO, \n progress_report.PART1_SUBMISSION_DATE, \n student_assignment.PROJECT_CODE, \n student_assignment.ADM_NO, \n project.PROJECT_CODE, \n project.SUPERVISOR, \n project.Co_SUPERVISOR1, \n project.CO_SUPERVISOR2, \n project.PROJECT_TITLE, \n project.OBJECTIVE, \n project.DESCRIPTION, \n project.SPECIFICATION, \n project.CAT_CODE, \n project.LOCATION, \n project.NO_OF_STUDENT, \n project.GROUP_CODE, \n staff.EMP_NO, \n staff.STAFF_ID, \n staff.STAFF_NAME, \n staff.DEPT_CODE, \n staff.ROOM_NO, \n staff.PHONE_NO, \n staff.GROUP_CODE \nFROM progress_report, student, weekly_dates, student_assignment, project, staff\nWHERE staff.STAFF_NAME = ?\n AND staff.STAFF_NAME = project.SUPERVISOR\n AND project.PROJECT_CODE = student_assignment.PROJECT_CODE\n AND student_assignment.ADM_NO = student.ADM_NO\n AND student.ADM_NO = progress_report.ADM_NO\n AND progress_report.WEEK_NO = weekly_dates.WEEK_NO ");
    progress_reportRowSet.setTableName("progress_report");
    progress_reportDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{Page2.progress_reportRowSet}"));
    weekly_datesDataProvider.cursorFirst();
    progress_reportRowSet.setObject(1, getSessionBean1().getAdm());
    and this
    public void selWeekDD_processValueChange(ValueChangeEvent event) {
    Object selectedPersonId = selWeekDD.getSelected();
    try {
    progress_reportDataProvider.setCursorRow(
    progress_reportDataProvider.findFirst("progress_report.WEEK_NO", selectedPersonId));
    getSessionBean1().getProgress_reportRowSet().setObject(1, selectedPersonId);
    progress_reportDataProvider.refresh();
    //form1.discardSubmittedValues("save");
    } catch (Exception e) {
    error("Cannot switch to person " + selectedPersonId);
    log("Cannot switch to person " + selectedPersonId, e);
    public void prerender() {
    if ( selWeekDD.getSelected() == null ) {
    Object firstPersonId = null;
    try {
    weekly_datesDataProvider.cursorFirst();
    firstPersonId = weekly_datesDataProvider.getValue("weekly_dates.week_NO");
    selWeekDD.setSelected(firstPersonId);
    getSessionBean1().getProgress_reportRowSet().setObject(
    1, firstPersonId);
    progress_reportDataProvider.refresh();
    } catch (Exception e) {
    error("Cannot switch to person " +
    firstPersonId);
    log("Cannot switch to person " +
    firstPersonId, e);
    How do i combine the checking of these 2 together, because if i do these 2 query checking like that they give me error for null parameter for 2 or more component but my database already has data and my rowset table already has the query check for parameter....

    Hi,
    I finally got it. But when i try to change the value from teh drop down list to display a new set of data i encounter error...I have the following code:
        public void prerender() {
           if ( selWeekDD.getSelected() == null ) {
               Object firstPersonId = null;
               try {
                   weekly_datesDataProvider.cursorFirst();
                   firstPersonId = weekly_datesDataProvider.getValue("weekly_dates.WEEK_NO");
                   selWeekDD.setSelected(firstPersonId);
                   progress_reportRowSet.setObject(
                          2, firstPersonId);
                   progress_reportDataProvider.refresh();
               } catch (Exception e) {
                   error("Cannot switch to person " +
                           firstPersonId);
                   log("Cannot switch to person " +
                           firstPersonId, e);
        public void selWeekDD_processValueChange(ValueChangeEvent event) {
            Object selectedPersonId = selWeekDD.getSelected();
            try {
                progress_reportDataProvider.cursorFirst();
                progress_reportDataProvider.setCursorRow(
                progress_reportDataProvider.findFirst("weekly_dates.WEEK_NO", selectedPersonId));
                progress_reportRowSet.setObject(2, selectedPersonId);
                progress_reportDataProvider.refresh();
                form1.discardSubmittedValues("selWeekDD");
            } catch (Exception e) {
                error("Cannot switch to person " + selectedPersonId);
                log("Cannot switch to person " + selectedPersonId, e);
    Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error.
    Exception Details: java.sql.SQLException
      Statement parameter 2 not set.
    Possible Source of Error:
       Class Name: com.mysql.jdbc.ServerPreparedStatement
       File Name: ServerPreparedStatement.java
       Method Name: serverExecute
       Line Number: 1031
    Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1031)
    com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676)
    com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1030)
    com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
    com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:950)
    com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1410)
    com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1219)
    com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:329)
    com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:300)
    com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:624)
    com.sun.rave.web.ui.component.TableRowGroup.getRowKeys(TableRowGroup.java:806)
    com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:429)
    com.sun.rave.web.ui.component.TableRowGroup.getSortedRowKeys(TableRowGroup.java:1385)
    com.sun.rave.web.ui.component.TableRowGroup.getRenderedRowKeys(TableRowGroup.java:876)
    com.sun.rave.web.ui.component.TableRowGroup.iterate(TableRowGroup.java:1956)
    com.sun.rave.web.ui.component.TableRowGroup.processDecodes(TableRowGroup.java:1679)
    javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
    com.sun.rave.web.ui.component.Form.processDecodes(Form.java:78)
    javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
    javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
    javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
    javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
    javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:306)
    com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    java.security.AccessController.doPrivileged(AccessController.java:-2)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
    org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    java.security.AccessController.doPrivileged(AccessController.java:-2)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
    org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    java.security.AccessController.doPrivileged(AccessController.java:-2)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
    com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    Exception Details: java.lang.RuntimeException
      java.sql.SQLException: Statement parameter 2 not set.
    Possible Source of Error:
       Class Name: com.sun.data.provider.impl.CachedRowSetDataProvider
       File Name: CachedRowSetDataProvider.java
       Method Name: setCursorRow
       Line Number: 343
    Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:343)
    com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:300)
    com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:624)
    com.sun.rave.web.ui.component.TableRowGroup.getRowKeys(TableRowGroup.java:806)
    com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:429)
    com.sun.rave.web.ui.component.TableRowGroup.getSortedRowKeys(TableRowGroup.java:1385)
    com.sun.rave.web.ui.component.TableRowGroup.getRenderedRowKeys(TableRowGroup.java:876)
    com.sun.rave.web.ui.component.TableRowGroup.iterate(TableRowGroup.java:1956)
    com.sun.rave.web.ui.component.TableRowGroup.processDecodes(TableRowGroup.java:1679)
    javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
    com.sun.rave.web.ui.component.Form.processDecodes(Form.java:78)
    javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
    javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
    javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
    javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:880)
    javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:306)
    com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    java.security.AccessController.doPrivileged(AccessController.java:-2)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
    org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    java.security.AccessController.doPrivileged(AccessController.java:-2)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
    org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    java.security.AccessController.doPrivileged(AccessController.java:-2)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
    com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    when i try change the drop down list value, this error occur my data type for both are integer. Anyone pls help thanks
    Message was edited by:
    k_k

  • Need help with interpreting tablespace usage script

    Hi,
    I have a script to find all the used and free spaces of a datafiles. The script is as below:
    SELECT Substr(df.tablespace_name,1,20) "Tablespace Name",
    Substr(df.file_name,1,40) "File Name",
    Round(df.bytes/1024/1024,2) "Size (M)",
    Round(e.used_bytes/1024/1024,2) "Used (M)",
    Round(f.free_bytes/1024/1024,2) "Free (M)",
    Rpad(' '|| Rpad ('X',Round(e.used_bytes*10/df.bytes,0), 'X'),11,'-') "% Used"
    FROM DBA_DATA_FILES DF,
    (SELECT file_id,
    Sum(Decode(bytes,NULL,0,bytes)) used_bytes
    FROM dba_extents
    GROUP by file_id) E,
    (SELECT Max(bytes) free_bytes,
    file_id
    FROM dba_free_space
    GROUP BY file_id) f
    WHERE e.file_id (+) = df.file_id
    AND df.file_id = f.file_id (+)
    ORDER BY df.tablespace_name,
    df.file_name
    The output displays data for all the datafiles. But when i check the free space, its much lesser than actual free space. Is this has something to do with High Water Mark? All the data is in MB.
    Tablespace             Datafile                                        SIZE           Used        Free
    GNP2000     D:\DATABASE\GNP2005.ORA     6110.8     5646.6     8.95     
    GNP2000     D:\DATABASE\GNP2009.ORA     3500     3357.98     8.95     
    GNP2000     D:\DATABASE\GNP2010.ORA     2000     1999.49     0.06     
    GNP2000     E:\ORANT\DATABASE\GNP2000.ORA     3500     3463.8     8.95     
    GNP2000     E:\ORANT\DATABASE\GNP2002.ORA     3046.88     2976.41     2.21
    Please explain why it displays different data and also how to find actual free space my database has?
    Thank You,

    This is because the script is WRONG.
    This is a lesson for you, if you are on 10g on higher, rather to trust the database control, which has already facilities for this, instead of someone developing a script. At least the Oracle provided material is correct.
    Admittedly, it does require you to read documentation and to find out things on your own.
    This part is WRONG
    SELECT Max(bytes) free_bytes,
    file_id
    FROM dba_free_space
    GROUP BY file_id)
    As an exercise, please try to find out for yourself, what is wrong.
    Please do not state you can not do this, this indicates you will never learn Oracle.
    Sybrand Bakker
    Senior Oracle DBA

  • Need help with checking xml files

    Hello!
    I would like to ask you for advice.
    I have following task to do: I need to compare values in XML file with one of databases.  Have you any ideas hot to do it? How to parse it using PL/SQL level?
    thanks for reply

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    I have following problem. External firm sending me a XML file with some fields for example: <price>5000$</price>;
    In my DB i have table with this column and i have to make a script in PL/SQL which is finding in my DB fields and compare with fields written in this XML file.
    Thanks.

  • NEED HELP WITH WORD & CHAR COUNT USING HASHTABLE

    I have to use a hashtable to be able to count all the words and characters (#'s, punctuations, etc) from a file
    I have been able to get it to correctly count the words in the file but none of the characters and it also does not display the words alphabetically and just displays it in an odd way
    Here's the code: public static void main (String [] args)
          Hashtable table = new Hashtable();
          String input = JOptionPane.showInputDialog("Enter the filename:");
          try{
          BufferedReader br = new BufferedReader(new FileReader(input));
          String s = br.readLine();
          StringTokenizer words = new StringTokenizer( s, " \n\t\r" );
            while ( words.hasMoreTokens() ) {
             String word = words.nextToken().toLowerCase(); // get word
             // if the table contains the word
             if ( table.containsKey( word ) ) {
                Integer count = (Integer) table.get( word ); // get value
                // and increment it
                table.put( word, new Integer( count.intValue() + 1 ) );
             else // otherwise add the word with a value of 1
                table.put( word, new Integer( 1 ) );
           } // end while
             String output = "";
          Enumeration keys = table.keys();
          // iterate through the keys
          while ( keys.hasMoreElements() ) {
             Object currentKey = keys.nextElement();
             output += currentKey + "\t" + table.get( currentKey ) + "\n";
             System.out.println(output.toString());
          catch (IOException e)
            System.out.println(e);
          }The output that I get for a file containing the line " Hi this is my java program" is:
    this     1
    this     1
    program     1
    this     1
    program     1
    hi     1
    this     1
    program     1
    hi     1
    java     1
    this     1
    program     1
    hi     1
    java     1
    is     1
    this     1
    program     1
    hi     1
    java     1
    is     1
    my     1
    I'm not sure what I am doing wrong and help would be greatly appreciated.

    I have been able to get it to correctly count the
    words in the file but none of the characters and it
    also does not display the words alphabetically and
    just displays it in an odd way
    That's because hash tables are not ordered; to maintain order of insertion you could use LinkedHashMap and to maintain alphabetical order TreeMap.

  • NEED HELP WITH COMBO BOX

    i am having a heck of a time writing the php and actionscript
    to get a combo box to load a list from a data base. And then once
    that list is loaded into cb_combo1 based on the users selection
    loading the appropriate list into cb_combo2 , so for example
    user is asked to select a state.
    once a state has been selected a list of schools from a
    database is loaded into the cb_combo2 based on the users selection.
    after the user selects the school , he is redirected to
    another URL.
    Let me know if anyone can help. Its for a project in school
    and i could really use the A. and the knowledge. I have been
    googleing for about 7 days now.
    Thanks all :-)
    CH

    The perfect tutorial for you:
    http://www.adobe.com/devnet/flash/articles/flash_xmlphp.html

  • Need help writing formula to count checked boxes

    This is probably a no brainer for you experts but I am making a spreadsheet for scoring a test and I have put in check boxes. Beside in the adjacent cells to the cells with check boxes I have placed the values that correspond to those check boxes. I want to be able to format a cell to do several things.
    First I need to link the adjacent values to the check box cell that it corresponds to.
    Then I need to format a cell to
    1. Count the number of boxes that have been checked.
    2. Display the values that are linked to cells if the total is 10 or under
    3. Display text that relates to the values that are linked to the cells.
    Your help is greatly appreciated.
    Shane

    The Pickler wrote:
    In answer to your first question. Each question is multiple choice and my layout is chosen to mimick the test itself for easy scoring.
    So I take this to mean that it is only valid to have one check per row.
    Second, if there are more than 10 I want it left blank.
    Right now, it is simpler to have this behave the the other way, in that it eliminates a complicating special case.
    So here's a screen shot of what I have on this:
    !http://img227.imageshack.us/img227/6263/questionairesummarywo1.png!
    Let me discuss this and explain some of the changes I made to your initial attempt.
    (1) Since I presumed one check per row, you can see in the "Responses" table I switched over to this type of data entry. This has several advantages and, most importantly, was key in clarifying my thoughts downstream. It does not permit the invalid multi-check per row and can be more readily entered via keyboard. The use of A,B,C,D for the choices is arbitrary; they could be 1,2,3,4 or any other distinct set of 4. If you ever want to simultaneously evaluate several questionnaires this can be accommodated better by adding additional columns to this table.
    (2) The references associated with each question's choices are encoded in the "Key" table. This table can be squirreled away on another sheet dedicated to questionnaire configuration and remain out of harm's way while entering response data. The column headings must correspond with the answer designations used in the "Responses" table.
    (3) The "Tally" table is purely for the computation of the "Summary". It allows both the number of each type of reference to be computed and the listing of the references. Since it is purely computational, it should be hidden away on another sheet.
    (4) The "Descriptions" table is where the association of references and the statements is expressed. Since, like the "Key" table, it is likely edited infrequently, this too should be squirreled away on the questionnaire configuration sheet.
    (5) Finally, the "Summary" table display the counts of each reference type and zero to ten of the references and associated statements. Currently, this shows as many as the first 10 because, as stated above, it avoids a complicating special case and is displayed elegantly via this filtered table (which avoid displaying the unused reference rows). The count is always the total count, even if it is exceeds ten.
    Third, since I don't know the first thing about writing formula's I guess I need to have you hold my hand through this process or teach me some basics. Please.....if your kind and willing enough to do so.
    As there are more than a couple of formulas here, the least time consuming way to explain them is simply to upload this Numbers document to a place you (or anyone else who is interested) can download it. Explore it for yourself and feel free to ask any questions you have about it or how to modify it to better suite your needs.
    You will find that the file contains three sheets. What is presented here resides solely on the third sheet. The first two sheets can safely be ignored/deleted, but I have left them in as they represent two earlier attempts (the first only partial, the second, more complete) at a solution. Some may find them interesting, perhaps containing good techniques for other problems.
    [Questionnaire Summary Numbers Document|http://www.mediafire.com/?1125t9nm9xm|Click to download a zip archive]
    This will take you to a page that will allow you to download the file directly (I apologize for any of this free hosting site's advertisements that you might find offensive). Click on the link in the yellow region on the mid-left part of the page. If all goes well, the zip will download and automatically unarchive into the Numbers document "QuestionnaireSummary.numbers". Let me know if you have trouble.

  • I need help with storage.    5 GB are free.   So iCloud sends an email that I need more.   So I purchase 20GB and now I want to downgrade back to the 5GB.   I can check the 5GB box, but no DONE button appears.   Anyone have an answer?

    I Need help with iCloud storage.   5gb are free, so I get an email, that mine is just about full.   So I upgraded to 20gb and now I want to downgrade back to 5gb.
    tthe DONE button doesn't highlight, so my requested can't be completed.   Any help will be appreciated.

    Have you tried rebooting the computer? If not, the next step is to contact iCloud Support. http://www.apple.com/support/icloud/

  • Help getting a form with check box capabilities?

    Hi all,
    I built a new site using Muse, which I am very happy with so far, but I am finding the forms a bit limiting. The previous website, which I am replacing with the new muse site, was built using Dreamweaver. The old site had a form with check boxes and it pointed to a PHP directory. Is there a way to acheive the same results in Muse? Either a form widget update (without having to use BC), or a simple way to configure Muse to interact with my PHP directory? I'm not a coder, but I can manage some light work.
    Any help would be greatly appreciated.
    Thanks!

    Thanks Morgan! Jotform is in the realm of possiblities; however, the company the site is for has a very strict privacy policy, which might be a concern when looking at free form builders. I should have mentioned that before.
    I beleive the best way to acheive what I'm trying to do is by linking the existing PHP directory to the new Muse site. The existing form built in Dreamweaver works fine, I just need to get the same form to work in Muse. Is there a way to do that?

  • I need help with this script please ASAP

    So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if you can.
    The script (Sorry if it's a bit long):
    #------------Startup-------------
    display dialog "Social Studies Exchange Trviva Game by Justin Parzik" buttons {"Take the Quiz", "Cyaaaa"} default button 1
    set Lolz to (button returned of the result)
    if Lolz is "Cyaaaa" then
    killapp()
    else if Lolz is "Take the Quiz" then
              do shell script "say -v samantha Ok starting in 3…2…1…GO!"
    #------------Question 1-----------
              display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
              set A1 to (button returned of the result)
              if A1 is "Apprentices" then
                        do shell script "say -v samantha Correct Answer"
              else
                        do shell script "say -v samantha Wrong Answer"
      #----------Question 2--------
                        display dialog "Most children were taught
    to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
                        set A2 to (button returned of the result)
                        if A2 is "Bible" then
                                  do shell script "say -v samantha Correct Answer"
                        else
                                  do shell script "say -v samantha Wrong Answer"
      #------------Question 3---------
                                  display dialog "In the 1730s and 1740s, a religious movement called the_______swept through the colonies." buttons {"Glorius Revolution", "Great Awakening", "The Enlightenment"}
                                  set A3 to (button returned of the result)
                                  if A3 is "Great Awakening" then
                                            do shell script "say -v samantha Correct Answer"
                                  else
                                            do shell script "say -v samantha Wrong Answer"
      #-----------Question 4--------
                                            display dialog "_______ was
    a famous American Enlightenment figure." buttons {"Ben Franklin", "George Washington", "Jesus"}
                                            set A4 to (button returned of the result)
                                            if A4 is "Ben Franklin" then
                                                      do shell script "say -v samantha Correct Answer"
                                            else
                                                      do shell script "say -v samantha Wrong Answer"
      #----------Question 5-------
                                                      display dialog "______ ownership gave colonists political rights as well as prosperity." buttons {"Land", "Dog", "Slave"}
                                                      set A5 to (button returned of the result)
                                                      if A5 is "Land" then
                                                                do shell script "say -v samantha Correct Answer"
                                                      else
                                                                do shell script "say -v samantha Wrong Answer"
      #---------Question 6--------
                                                                display dialog "The first step toward guaranteeing these rights came in 1215. That
    year, a group of English noblemen forced King John to accept the…" buttons {"Declaration of Independence", "Magna Carta", "Constitution"}
                                                                set A6 to (button returned of the result)
                                                                if A6 is "Magna Carta" then
                                                                          do shell script "say -v samantha Correct Answer"
                                                                else
                                                                          do shell script "say -v samantha Wrong Answer"
      #----------Question 7--------
                                                                          display dialog "England's cheif lawmaking body was" buttons {"the Senate", "Parliament", "King George"}
                                                                          set A7 to (button returned of the result)
                                                                          if A7 is "Parliament" then
                                                                                    do shell script "say -v samantha Correct Answer"
                                                                          else
                                                                                    do shell script "say -v samantha Wrong Answer"
      #--------Question 8-----
                                                                                    display dialog "Pariliament decided to overthrow _______ for not respecting their rights" buttons {"King James II", "King George", "King Elizabeth"}
                                                                                    set A8 to (button returned of the result)
                                                                                    if A8 is "King James II" then
                                                                                              do shell script "say -v samantha Correct Answer"
                                                                                    else
                                                                                              do shell script "say -v samantha Wrong Answer"
      #--------Question 9------
                                                                                              display dialog "Parliament named ___ and ___ as England's new monarchs in something called ____." buttons {"William/Mary/Glorius Revolution", "Adam/Eve/Great Awakening", "Johhny/Mr.Laphalm/Burning of the hand ceremony"}
                                                                                              set A9 to (button returned of the result)
                                                                                              if A9 is "William/Mary/Glorius Revolution" then
                                                                                                        do shell script "say -v samantha Correct Answer"
                                                                                              else
                                                                                                        do shell script "say -v samantha Wrong Answer"
      #---------Question 10-----
                                                                                                        display dialog "After accepting the throne William and Mary agreed in 1689 to uphold the English Bill of _____." buttons {"Money", "Colonies", "Rights"}
                                                                                                        set A10 to (button returned of the result)
                                                                                                        if A10 is "Rights" then
                                                                                                                  do shell script "say -v samantha Correct Answer"
                                                                                                        else
                                                                                                                  do shell script "say -v samantha Wrong Answer"
      #---------Question 11------
                                                                                                                  display dialog "By the late 1600s French explorers had claimed the ___ River Valey" buttons {"Mississippi", "Ohio", "Hudson"}
                                                                                                                  set A11 to (button returned of the result)
                                                                                                                  if A11 is "Ohio" then
                                                                                                                            do shell script "say -v samantha Correct Answer"
                                                                                                                  else
                                                                                                                            do shell script "say -v samantha Wrong Answer"
      #------Question 12---------
                                                                                                                            display dialog "______ was sent to ask the French to leave 'English Land'." buttons {"Johhny Tremain", "George Washington", "Paul Revere"}
                                                                                                                            set A12 to (button returned of the result)
                                                                                                                            if A12 is "George Washington" then
                                                                                                                                      do shell script "say -v samantha Correct Answer"
                                                                                                                            else
                                                                                                                                      do shell script "say -v samantha Wrong Answer"
      #---------Question 13-------
                                                                                                                                      display dialog "_____ proposed the Albany Plan of Union" buttons {"George Washingon", "Ben Franklin", "John Hancock"}
                                                                                                                                      set A13 to (button returned of the result)
                                                                                                                                      if A13 is "Ben Franklin" then
                                                                                                                                                do shell script "say -v samantha Correct Answer"
                                                                                                                                      else
                                                                                                                                                do shell script "say -v samantha Wrong Answer"
      #--------Question 14------
                                                                                                                                                display dialog "The __________ declared that England owned all of North America east of the Mississippi" buttons {"Proclomation of England", "Treaty of Paris", "Pontiac Treaty"}
                                                                                                                                                set A14 to (button returned of the result)
                                                                                                                                                if A14 is "" then
                                                                                                                                                          do shell script "say -v samantha Correct Answer"
                                                                                                                                                else
                                                                                                                                                          do shell script "say -v samantha Wrong Answer"
      #-------Question 15-------
                                                                                                                                                          display dialog "Braddock was sent to New England so he could ______" buttons {"Command an attack against French", "Scalp the French", "Kill the colonists"}
                                                                                                                                                          set A15 to (button returned of the result)
                                                                                                                                                          if A15 is "Command an attack against French" then
                                                                                                                                                                    do shell script "say -v samantha Correct Answer"
                                                                                                                                                          else
                                                                                                                                                                    do shell script "say -v samantha Wrong Answer"
      #------TheLolQuestion-----
                                                                                                                                                                    display dialog "____ is the name of the teacher who runs this class." buttons {"Mr.White", "Mr.John", "Paul Revere"} default button 1
                                                                                                                                                                    set LOOL to (button returned of the result)
                                                                                                                                                                    if LOOL is "Mr.White" then
                                                                                                                                                                              do shell script "say -v samantha Congratulations…you…have…common…sense"
                                                                                                                                                                    else
                                                                                                                                                                              do shell script "say -v alex Do…you…have…eyes?"
                                                                                                                                                                              #------END------
                                                                                                                                                                              display dialog "I hope you enjoyed the quiz!" buttons {"I did!", "It was horrible"}
                                                                                                                                                                              set endmenu to (button returned of the result)
                                                                                                                                                                              if endmenu is "I did!" then
                                                                                                                                                                                        do shell script "say -v samantha Your awesome"
                                                                                                                                                                              else
                                                                                                                                                                                        do shell script "say -v alex Go outside and run a lap"
                                                                                                                                                                              end if
                                                                                                                                                                    end if
                                                                                                                                                          end if
                                                                                                                                                end if
                                                                                                                                      end if
                                                                                                                            end if
                                                                                                                  end if
                                                                                                        end if
                                                                                              end if
                                                                                    end if
                                                                          end if
                                                                end if
                                                      end if
                                            end if
                                  end if
                        end if
              end if
    end if

    Use code such as:
    display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
    set A1 to (button returned of the result)
    if A1 is "Apprentices" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    #----------Question 2--------
    display dialog "Most children were taught to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
    set A2 to (button returned of the result)
    if A2 is "Bible" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    (90444)

  • Need help with threads?.. please check my approach!!

    Hello frnds,
    I am trying to write a program.. who monitors my external tool.. please check my way of doing it.. as whenever i write programs having thread.. i end up goosy.. :(
    first let me tell.. what I want from program.. I have to start an external tool.. on separate thread.. (as it takes some time).. then it takes some arguments(3 arguments).. from file.. so i read the file.. and have to run tool.. continously.. until there are arguments left.. in file.. or.. user has stopped it by pressing STOP button..
    I have to put a marker in file too.. so that.. if program started again.. file is read from marker postion.. !!
    Hope I make clear.. what am trying to do!!
    My approach is like..
    1. Have two buttons.. START and STOP on Frame..
    START--> pressed
    2. check marker("$" sign.. placed in beginning of file during start).. on file..
         read File from marker.. got 3 arg.. pass it to tool.. and run it.. (on separate thread).. put marker.. (for next reading)
         Step 2.. continously..
    3. STOP--> pressed
         until last thread.. stops.. keep running the tool.. and when last thread stops.. stop reading any more arguments..
    Question is:
    1. Should i read file again and again.. ?.. or read it once after "$" sign.. store data in array.. and once stopped pressed.. read file again.. and put marker ("$" sign) at last read line..
    2. how should i know when my thread has stopped.. so I start tool again??.. am totally confused.. !!
    please modify my approach.. if u find anything odd..
    Thanks a lot in advance
    gervini

    Hello,
    I have no experience with threads or with having more than run "program" in a single java file. All my java files have the same structure. This master.java looks something like this:
    ---master.java---------------------------------------------------
    import java.sql.*;
    import...
    public class Master {
    public static void main(String args []) throws SQLException, IOException {
    //create connection pool here
    while (true) { // start loop here (each loop takes about five minutes)
    // set values of variables
    // select a slave process to run (from a list of slave programs)
    execute selected slave program
    // check for loop exit value
    } // end while loop
    System.out.println("Program Complete");
    } catch (Exception e) {
    System.out.println("Error: " + e);
    } finally {
    if (rSet1 != null)
    try { rSet1.close(); } catch( SQLException ignore ) { /* ignored */ }
    connection.close();
    -------end master.java--------------------------------------------------------
    This master.java program will run continuously for days or weeks, each time through the loop starting another slave process which runs for five minutes to up to an hour, which means there may be ten to twenty of these slave processes running simultaneously.
    I believe threads is the best way to do this, but I don't know where to locate these slave programs: either inside the master.java program or separate slave.java files? I will need help with either method.
    Your help is greatly appreciated. Thank you.
    Logan

Maybe you are looking for

  • Managed System - error in SSO setup

    Hi Experts, i am doing Managed system configuration but stuck on "step 8 - Configure Automatically" with below error. My SOLMAN version is 71 SPS11. Error while calling Diagnostics setup web service. Check note 1822831. CX_AI_SYSTEM_FAULT : SOAP:1.00

  • IPhoto Printing Services from pdf format?

    I created a book in iPhoto 08 but it was deleted accidentally. I have Time Machine, but the the book under Project does not show up at all. Fortunately, i have printed out a pdf version. Can I send the pdf to Apple to order the printing of photo book

  • Midi stops working in Logic 9.1

    When using Logic 9.1 I have been having midi crashes that require me to restart Logic. All Audio files will still play but I cannot play any 3rd party or Logic softsynths. I am getting a midi signal from my keyboard to my MOTU Ultralite interface but

  • Movie (rental) download stopped in error. Cannot download movie.

    I pressed pause on Apple TV (2) remote by mistake twice, thus stopping movie (rental) download. Now unable to find. When trying to download again, message reads "You have already rented this movie, go to Settings and check in Download". There is no "

  • Tooltip of detail navigation page is throwing error

    Hi all, When we right click the detail navigation in the page, we get a tooltip. When we click on <b>copy shortcut</b> and paste it in a new browser, it should direct us to the same page. But it is not going in my case, it redirecting some default pa