How to enable / disable certain fields based on the value of the checkbox

This is probably a stupid question, but I was not able to find the trivial solution (I'm fairly new to the user's BlackBerry interface)

Example scenario:

Screen of the user interface with two components

box: "Run daily.

time field: ' to hh: mm ".

If the check box is enabled, the hour field must be activated. If the check box is not selected, the time field should be disabled.

I wasn't able to find a simple solution. The solution is to remove all components and re-create it with different style (Field.NON_FOCUSABLE |) Field.READONLY), but there are significant drawbacks:

  1. It's pretty messy keep the current value (if the user has modified the time field and click twice on the box, I would like to have the same value and the field must be dirty)
  2. She becomes more messy when you have more complicated logic (panels inside panels that should be enabled / disabled based on all parent checkboxes)

Any ideas?

Thanks in advance!

The way I handled it was to the custom methods in areas that allow me to set the disabled and then state substitute TouchEvent, NavigationMovement and NavigationClick methods to search for this variable and simply return true if it is defined. This will take care of the FieldChanged States and targeted to make them unable to be activated.

Tags: BlackBerry Developers

Similar Questions

  • JavaScript to remove the contents of the fields based on the checkbox disabled

    I'm writing a java script to delete the contents of the fields when a checkbox's checked to disabled.  I have a java script to fill in the field when the checkbox is enabled (which works perfectly).  But in the case where the user accidentally checks the field and wants to uncheck the box I would like the content of field that were initially filled from the first java script to be removed/disabled.

    Here is my code:

    Mouse Up Script for the checkbox (function() {}

    Do something if this check box is not selected.
    if(Event.Target.Value==="on") return;

    Copy the values from text previously filled in those other fields.

    getField("AP_Unit").value = Null;
    getField("AP_StreetAddress").value = Null;
    getField("AP_City").value = Null;
    getField("AP_Province").value = Null;
    getField("AP_ZIP").value = Null;
    getField("AP_Country").value = Null;

    })();

    Sorry it works... that make three equal signs "=" means?

    Here is my code

    If {(event.target.value==="Off)"}
    getField("AP_Unit").value =("");
    getField("AP_StreetAddress").value =("");
    getField("AP_City").value =("");
    getField("AP_Province").value =("");
    getField("AP_ZIP").value =("");
    getField("AP_Country").value =("");

    } else {}

    getField("AP_Unit").value = getField("HO_Unit").valueAsString;
    getField("AP_StreetAddress").value = getField("HO_StreetAddress").valueAsString;
    getField("AP_City").value = getField("HO_City").valueAsString;
    getField("AP_Province").value = getField("HO_Province").valueAsString;
    getField("AP_ZIP").value = getField("HO_ZIP").valueAsString;
    getField("AP_Country").value = getField("HO_Country").valueAsString;
    }

  • How to hide/show a field based on the data from more than 1 field?

    Hello.

    I'm trying to hide/show a based on the data of field2 and field3, Field1

    in fact using dynamic measurements I can only hide/show Field1 Field2-based, but I need a combination, for example:

    If field1 = 'A' and field2 = 'B', then see the field3, other hide field3

    y at - it an easy way to do it.

    I use Application Express 4.2.4.00.08

    Thanks in advance

    Dynamic action

    On the changes

    jQuery selector: #P1_ITEM_1, #P1_ITEM_2

    Condition: JavaScript

    $v ('P1_ITEM_1') == 'A' & $v ('P1_ITEM_2') == 'B '.

    Real Action: show item 3

    Action of false: hide item 3

  • Fill in the multiple fields based on the checkbox

    (other questions newb...)

    You want to fill several form fields from or not a checkbox is enabled.

    I now using scripts calculated in the work field. for example:

    If (this.getField("checkbox").value == "Off") {}

    Event.Value = null;

    } else {}

    Event.Value = "ABCXYZ";

    }

    However, it is possible to assign values only from the field box itself?

    Yes, you can do so from the MouseUp event of the checkbox field. It will look something like this:

    if (event.target.value=="Off") {
        this.getField("Text1").value = "";
        this.getField("Text2").value = "":
    } else {
        this.getField("Text1").value = "ABCXYZ";
        this.getField("Text2").value = "123456":
    }
    
  • Fill in the time field, based on the checkbox

    I am trying to find a script to do the following:

    If checkfield.rawValue = "1" (checked)

    timefield.rawValue = (current time)

    If checkfield.rawValue = "0" (unchecked)

    timefield.rawValue = 'null '.

    Any ideas or suggestions would be greatly appreciated.

    Thank you.

    Here's a modified version. Display BBS of the script added additional characters that mess. I moved the code to the change event of the box (I think it's nicer whne the user clicks to see the change rather than leave the checkbox). Validate the e Th message was because you had a pattern on the ground and time resulting does not match. I deleted the template as well as disable the validation script message.

    Paul

  • How can I display more fields based on the value of another field in conjunction with the visibility of the others?

    I have 17 text fields 'questions' and have hidden buttons for each I would appear once the administrator puts in a "password" at the bottom of the page.

    For the "password", I created a text field to enter this password and a "Log In" button.

    I want to be able to do is for the user to put in the 'password' and the 'Log In' button contains the script necessary to display these fields. 17 text fields show only one at a time, so I want the action of the 'Log In' button to show only the hidden buttons corresponding to the current visible areas.

    Here is my code. What happens is little matter what I do, it says the password is incorrect and mask "publient1" which has never been specified in the code in a variable.

    Initially, I had the first "else if" statement as the first "If" statement, but the results are the same in any event.

    var res = this.getField("resolution");
    var password = this.getField("password");
    var res1 = this.getField("add-res1");
    var res2 = this.getField("add-res2");
    var res3 = this.getField("add-res3");
    var res4 = this.getField("add-res4");
    var res5 = this.getField("add-res5");
    var res6 = this.getField("add-res6");
    var res7 = this.getField("add-res7");
    var res8 = this.getField("add-res8");
    var res9 = this.getField("add-res9");
    var res10 = this.getField("add-res10");
    var res11 = this.getField("add-res11");
    var res12 = this.getField("add-res12");
    var res13 = this.getField("add-res13");
    var res14 = this.getField("add-res14");
    var res15 = this.getField("add-res15");
    var res16 = this.getField("add-res16");
    var res17 = this.getField("add-res17");
    var issue1 = this.getField("issue1");
    var issue2 = this.getField("issue2");
    var issue3 = this.getField("issue3");
    var issue4 = this.getField("issue4");
    var issue5 = this.getField("issue5");
    var issue6 = this.getField("issue6");
    var issue7 = this.getField("issue7");
    var issue8 = this.getField("issue8");
    var issue9 = this.getField("issue9");
    var issue10 = this.getField("issue10");
    var issue11 = this.getField("issue11");
    var issue12 = this.getField("issue12");
    var issue13 = this.getField("issue13");
    var issue14 = this.getField("issue14");
    var issue15 = this.getField("issue15");
    var issue16 = this.getField("issue16");
    var issue17 = this.getField("issue17");
    var iv1 = issue1.display = display.visible;
    var iv2 = issue2.display = display.visible;
    var iv3 = issue3.display = display.visible;
    var iv4 = issue4.display = display.visible;
    var iv5 = issue5.display = display.visible;
    var iv6 = issue6.display = display.visible;
    var iv7 = issue7.display = display.visible;
    var iv8 = issue8.display = display.visible;
    var iv9 = issue9.display = display.visible;
    var iv10 = issue10.display = display.visible;
    var iv11 = issue11.display = display.visible;
    var iv12 = issue12.display = display.visible;
    var iv13 = issue13.display = display.visible;
    var iv14 = issue14.display = display.visible;
    var iv15 = issue15.display = display.visible;
    var iv16 = issue16.display = display.visible;
    var iv17 = issue17.display = display.visible;
    var ih1 = issue1.display = display.hidden;
    var ih2 = issue2.display = display.hidden;
    var ih3 = issue3.display = display.hidden;
    var ih4 = issue4.display = display.hidden;
    var ih5 = issue5.display = display.hidden;
    var ih6 = issue6.display = display.hidden;
    var ih7 = issue7.display = display.hidden;
    var ih8 = issue8.display = display.hidden;
    var ih9 = issue9.display = display.hidden;
    var ih10 = issue10.display = display.hidden;
    var ih11 = issue11.display = display.hidden;
    var ih12 = issue12.display = display.hidden;
    var ih13 = issue13.display = display.hidden;
    var ih14 = issue14.display = display.hidden;
    var ih15 = issue15.display = display.hidden;
    var ih16 = issue16.display = display.hidden;
    var ih17 = issue17.display = display.hidden;
    if(password.value == "") {
        res.display = display.hidden;
        res1.display = display.hidden;
     res2.display = display.hidden;
     res3.display = display.hidden;
     res4.display = display.hidden;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden; 
    }
    else if(password.value == "firefly" && iv1 && ih2 && ih3 && ih4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.hidden;
     res3.display = display.hidden;
     res4.display = display.hidden;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && ih3 && ih4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.hidden;
     res4.display = display.hidden;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && ih4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.hidden;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.noPrint;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.noPrint;
     res14.display = display.noPrint;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && iv15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.noPrint;
     res14.display = display.noPrint;
     res15.display = display.noPrint;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && iv15 && iv16 && ih17) {
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.noPrint;
     res14.display = display.noPrint;
     res15.display = display.noPrint;
     res16.display = display.noPrint;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && iv15 && iv16 && iv17) {
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.noPrint;
     res14.display = display.noPrint;
     res15.display = display.noPrint;
     res16.display = display.noPrint;
     res17.display = display.noPrint;
    }
    else {
        app.alert("The wrong password was entered. Please enter the correct password.")
        iv1;
        res1.display = display.hidden;
     res2.display = display.hidden;
     res3.display = display.hidden;
     res4.display = display.hidden;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    

    These lines in your code does not make sense (and the rest of the code is dependent on them):

    iv1 var = issue1.display = display.visible;

    I think what you mean probably to do is the following:

    iv1 var = (issue1.display == display.visible);

    This sentence of yours shows a lack of understanding of the JS operators:

    I also tried several operators equal sign for password.value, including a single equal sign, through three equal signs.

    You should do some research and find out what the differences are between '=', 'is' and ' ='. '. They are essential to your code.

  • How to disable certain fields in the form of a calculation with a checkbox for the fields.

    How to disable certain fields in the form of a calculation with a checkbox for the fields.

    In Canada, we have taxes

    I create a form that allows them to calculate a total

    Shema-pdf-form.gif

    I need to be able to turn off all of those taxes to participate in the calculation and to their field visible should be 0

    I was thinking about using a check box (when the checkbox is enabled (Yes) the tax is calculated, unchecked (Off) the tax is not calculated and visible field should show 0 or anything...)

    I really need help on this one, I am a complete newbie...

    Note that the second tax is calculated on the sum of what the first tax Add (tax first is pan-Canadian tax (all provinces).

    The second tax is never only use (Quebec only (in addition to one Canadian)

    Sometimes to sell outside Canada - no tax at all is calculated...

    What should I do?

    Yes, it's just the JS...

  • How to enable/disable cookies in Firefox for iOS?

    How to enable/disable cookies in Firefox for iOS?

    Hi Aaaassssddddffff,
    To disable or enable cookies in Firefox iOS, you need a content blocker. This is done in Safari tap Settings > Safari > block Cookies

    Focus is a nice content for devices with ios 8 and maximum blocker, this could be a nice way to block certain content, including cookies. Focus by Firefox

  • In: toggle a field based on the State of a checkbox

    Hi all
    I have a tabular form on a single table. The table has a Y/N column type. So to see this checkbox column I followed excellent tutorial http://www.inside-oracle-apex.com/checkboxes-in-tabular-forms-the-easy-way/ Patrick

    It works very well. But now I also want to turn another field based on the question of whether this check box is checked or not. To do this, I followed another post on how to do it and it also works. But the problem is when I try to save the form, I get the dreaded MRU error.

    Tabular form fields
    NAME, SALARY, ACTIVE

    NAME-> Normal text box
    SALARY-> I want this field to be enabled/disabled based on the value of the last column ENABLED_CHECKBOX
    ENABLED_CHECKBOX-> it's a checkbox (created by following the tutorial of Patrick)

    What I did to make SALARY toggle dynamically (it works, but I get error MRU registration)
    Change ENABLED CHECKBOX_
    ENABLED_CHECKBOX-> This is a standard report with the following HTML Expression field:
    "< pre > < input type ="checkbox"#ENABLED_CHECKBOX # value =" "#ROWNUM #" name = "f40" id = "f40_ #ROWNUM # ' class = 'MyClass' / > < / pre >


    Additional dynamic action
    WHEN = change event
    Selection type = jQuery Selector
    JQuery Selector = .myClass
    Condition = no requirement

    Real Action = run Javascript

    Code =
    < pre >
    column_2_id = "f02_000" + $(this.triggeringElement).attr('id').substr (4);

    If (.attr ('checked')) $(this.triggeringElement)
    {
    $("#"_+_column_2_id).attr ("disabled", "disabled");
    }
    on the other
    {
    $("#"_+_column_2_id).attr ("disabled", false);
    }
    < / pre >

    Sylvie,

    You must reactivate the fields before being submitted, because the disabled fields are not subject at all - and that throws what APEX collections uses tabular forms. See my post here.

    Short version: use something like this as an action dynamic javascript before submitting the form:

    $('input:disabled').attr('disabled',false);
    

    -David

  • Auto-fill text box values field based on the selection of the menu drop-down

    Try to fill in address, city, province, zip from text fields based on the selected option in a select form field. The following code works fine in Internet Explorer, but in Chrome or Firefox, after selection, text, the fields are filled with the word "undefined."

    I found a PHP script Jquery here version that would probabably do the trick.
    http://StackOverflow.com/questions/3657127/jQuery-populate-text-input-from-table-based-on-select-Valeur

    Maybe someone has a version of CF. they could share?

    Thanks in advance to anyone who can point me to a solution for this code, or a better way to fulfill my need.

    <!--> destinations with address auto-fill, city, etc.
    < script type = "text/javascript" >
    function selectAddress (list) {}
    take the first element is empty
    If (list.selectedIndex > 0) {}
    var locationID = list.options [list.selectedIndex] .value;
    locationAddress var = list.options [list.selectedIndex] .locationAddress;
    var locationCity = list.options [list.selectedIndex] .locationCity;
    var locationState = list.options [list.selectedIndex] .locationState;
    var locationZip = list.options [list.selectedIndex] .locationZip;
    document.getElementById('locationID').value = locationID;
    document.getElementById('locationAddress').value = locationAddress;
    document.getElementById('locationCity').value = locationCity;
    document.getElementById('locationState').value = locationState;
    document.getElementById('locationZip').value = locationZip;
    }
    }
    < /script >
    < b >
    < td align = 'right' bgcolor = "#FFFFFF" valign = "top" > Destination name < table >
    < td align = "left" bgcolor = "#FFFFFF" valign = "top" >
    < select name = "locationID" onChange = "selectAddress (this)" class = "smallforms" > "
    < option value = "" > SELECT the DESTINATION ››› < / option >
    < cfoutput query = "allLocations" >
    "" < option value = "" #locationName # "locationAddress =" #allLocations.locationAddress # "locationCity =" "#allLocations.locationCity #" locationState = "#allLocations.locationState #" locationZip = "#allLocations.locationZip #" > #locationName # < / option >
    < / cfoutput >
    < / select >

    Others: cfinput name = "destinationNameOther" type = "text" class = "smallforms" size = "75" >
    < br / >
    < input id = "locationID" name = "locationID" type = "hidden" > < br >

    Address: < input class = "smallforms" id = "locationAddress" name = "locationAddress" type = "text" size = "30" >
    City: < input class = "smallforms" id = "locationCity" name = "locationCity" type = "text" size = "20" >
    State: < input class = "smallforms" id = "locationState" name = "locationState" type = "text" size = "2" >
    Postal code: < input class = "smallforms" id = "locationZip" name = "locationZip" type = "text" size = "8" > < br / >
    < br / >
    < table > < /tr >

    In your last code done selectAddress refers to "index" but I'm not declared or assigned. I think that you are missing 'var index = list.selectedIndex;' statement.

  • AutoFill based on the checkbox

    I'm relatively new to any idea in Javascript and Formcalc for forms of script. I created a form in need of some expensive attention. What I'm trying to do is autopopulate text fields based on the box, if it is enabled or not.

    Example: Once the property information - property name, street address, city, State and zip code (at the top of the form) are filled. If the box is checked in the section information of client (below), it will enter information according to the property information in the fields of the address below in the assigned text fields.

    Here is my code Javascript (not exhaustive):

    FLContract. #subform [0]. PayerName::calculate - (JavaScript, client)

    var a =' '

    If (this.getField ("CheckBoxPropertyInfo") .value == 1)
    {
    a = propName.Value
    }
    Event.Value = has

    Capture.PNG

    Enter this slot option 'Change' to the editor script for the checkbox control. just rename your fields appropriately. The second 'if' will reset the fields if they accidentally clicked on it. Name [1] is the field you want the box to be filled. 'Name' is the original field.

    If (this.rawValue == '1') {}

    this.resolveNode("Name[1]").rawValue = this.resolveNode("Name").rawValue;

    this.resolveNode("Address[1]").rawValue = this.resolveNode("Address").rawValue;

    this.resolveNode("City[1]").rawValue = this.resolveNode("City").rawValue;

    this.resolveNode("State[1]").rawValue = this.resolveNode("State").rawValue;

    this.resolveNode("ZipCode[1]").rawValue = this.resolveNode("ZipCode").rawValue;

    this.resolveNode("Country[1]").rawValue = this.resolveNode("Country").rawValue;

    }

    If (this.rawValue == '0') {}

    this.resolveNode("Name[1]").rawValue = "";

    this.resolveNode("Address[1]").rawValue = "";

    this.resolveNode("City[1]").rawValue = "";

    this.resolveNode("State[1]").rawValue = "";

    this.resolveNode("ZipCode[1]").rawValue = "";

    this.resolveNode("Country[1]").rawValue = "";

    }

  • How to calculate the sum of two digital form fields based on the selection of the checkbox.

    I have a form in Acrobat Pro who needs a custom calculation. How to calculate the sum of two digital form fields based on a selection of the checkbox. I have three number fields. Field-A and B are simple one or two digits. Field-C is the sum, or the total field. I want to field-C have a control box which, when turned on and off, just gives a. gives the sum of A + B

    _ Field - 2

    _ Field - A 4

    [check] _ _ field - 6 C

    [disabled] _ _ field - 2 C

    Thank you

    The custom field C calculation script could be:

    (function () {
    
        // Get the values of the text fields, as numbers
        var v1 = +getField("A").value;
        var v2 = +getField("B").value;
    
        // Set this field's value based on the state of the check box named "CB"
        if (getField("CB").value !== "Off") {
            event.value = v1 + v2;
        } else {
            event.value = v1;
        }
    
    })();
    

    Replace 'A', 'B', and 'CB' with the real names of the fields.

  • Advanced DataGrid and checkboxes... How to enable/disable dynamically

    I have an advanced data grid.  I use a checkbox as an itemRenderer in a single column.  I want to be able to enable or disable the ability to change the box, based on the user role that is unknown until the connection process ends.

    If the column and do a myColumn.enabled = false, the check box may still be check or not controlled by the user.   This seems to be some kind of problem ", it is already rendered' or something.

    < mx:AdvancedDataGrid dataProvider = "{myData}" itemClick = "myDG_itemClick (event)" id = "adgMyGrid" > "
    < mx:columns >

    < mx:AdvancedDataGridColumn width = '10' id = 'adgColumn' editable = "false" visible = "true" sortable = "false" dataField = "myData" itemRenderer = "mx.controls.CheckBox" / > "
    < / mx:columns >
    < / mx:AdvancedDataGrid >

    Using the above, I guess that the adgColumn should not be editable.  But it remains editable, no matter if I try to put it in the code or in the statement.  What I am doing wrong?

    You must have a data field that specifies whether the user should be able to change the State of the checkbox. Thus, during its connection, change the ADG data provider. And reference the field data provider for the field check box selected.

  • How do fill you a text field based on the entries in other text fields?

    I would like to be able to have a text field that fills as 'Full' or 'Incomplete' based on the question if all required fields have been filled or not.

    For example, if the "First Name", "Last Name" and "City" text fields are not filled, the text of "the State of completion" field displays 'Incomplete' and once they are filled, the text of "the State of completion" field will turn into "Complete".

    How can I do this using javascript? I searched the web for a tutorial, but most of the results seems to be focused on the menu drop-down.

    Please point me in the right direction!

    Try the script below. I put this on the calculate for Field1 event

    If (FirstName.rawValue == null |) LastName.rawValue == null | City.rawValue == null) {}

    Field1.RawValue = "incomplete."

    }

    on the other

    Field1.RawValue = "complete."

  • How the auto fill a field based on the drop-down list unless the specific item is selected

    Hi all

    My apologies if I posted this in in the wrong place, but I am new to these forums, JavaScript and Adobe LiveCycle.

    I am trying to build a form using LiveCycle Acrobat but have problems with the drop-down lists.

    Inititaly I just wanted to fill in the fields in a table based on a matching menu selection dropdown in another table.

    I used the following code and it worked fine:

    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)

    fFrom var = xfa.resolveNodes ("Workbook.Content.Table1.Row3.AppropriationDetails [*]. Row4.cell1');

    OTF var = xfa.resolveNodes ("Workbook.Content.Table2.Row3.AppropriationDetails [*]. Row4.cell1");

    for (var i = 0; i < = fFrom.length - 1; i ++) {}

    fTo.item (i) .rawValue = fFrom.item (i) .boundItem (xfa.event.newText);

    }

    The problem is that now I want the code above works UNLESS one of the items in the drop-down list is enabled specifically in this case, I want the text box in the other table to display a message such as "Details of the entry in the field below.

    I tried to create an If Else statement using the following code:

    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)

    fFrom var = xfa.resolveNodes ("Workbook.Content.Table1.Row3.AppropriationDetails [*]. Row4.cell1');

    OTF var = xfa.resolveNodes ("Workbook.Content.Table2.Row3.AppropriationDetails [*]. Row4.cell1");

    for (var i = 0; i < = fFrom.length - 1; i ++) {}

    If (fFrom.item (i) .rawvalue = "Option 3") {}

    fTo.item (i) .rawValue = "enter the details in the field below.

    }

    else {}

    fTo.item (i) .rawValue = fFrom.item (i) .boundItem (xfa.event.newText);

    }

    }

    The code now filled the field with "Enter the details in the field below" any item I select in the drop-down list.

    Your help is greatly appreciated.

    See you soon,.

    ozzy_q

    Hello

    You use .rawValue in the change event. This will cause problems because the selection of the users has not received .rawValue from the drop-down list at the time when the change event is triggered.

    Move your script as it should to the output of the dropdown event.

    Hope that helps,

    Niall

Maybe you are looking for

  • Since 4 days I have only to receive the same letter and is blocking the rest

    for now about 350 times and other emails don't come any more on computer laptop m: I tried to block the sender, but the emails and now she "hangs" for download. Sorry for my not technical explanation...

  • Not have access to purchases on the old code.

    I changed my Apple ID, now for my iPad, Mac, and iPhone ask for my password for my old ID.  When I enter the password for the old ID system that ID does not exist.  How can I access my purchases of old?

  • Need to restore bios every time you start upward

    Hi, I noticed recently in my computer my Nvidia graphics card wasn't "working" on my laptop, and after trying many difficulties found an outdated bios question.  I've updated the bios and it has created some problems. On commissioning, I got a blue s

  • How to change the color of selected text-setting to default value

    HelloI'm WORD 2007 documents on a LCD Dell monitor display. Selected-text-point color highlight default appears as a light blue barely visible. I would like to change this color to something more visible, especially when I do a SEARCH/REPLACE, maybe

  • HP officjet 8610 pro: configuration help

    I called hp, I have e hp mailed, I tried to discuss with hp. All to nothing does not.  Here excessive time, over an hour, waiting on the e-mail response, tech unprofessional cat, casually or knowladgeable at all. wanted to enroll in the program to Au