Set the value of items when the box is checked

Hello

My requirement is when a checkbox is clicked it should set the value of an element such as 111111 and clear the values of two objects in a page of the apex.
I used the java script onClick event to set the items using document.getElementByID ('Item_Name') = ";
One element that needs to be eliminated is a type of conditional.
When the element condional, java script works very well. But if it is not present.
code works, but it displays "error on page" for a few seconds.

Is it possible to erase the element only when the element is present in the page.

Thank you
Ravi

Hello

Yes as for example

if($x("ITEM_NAME")){
 $s("ITEM_NAME", "");
}

Kind regards
Jari

Tags: Database

Similar Questions

  • Firefox does not save previous seession Web sites, even if the box is checked.

    I recently upgraded to Firefox 5.0. I'm having two problems since the upgrade:

    1 Firefox saves more websites that I left 0pen from a previous session even if the box is checked to do. In addition, I am never given the option to 'restore previous session' in the menu background. It is always 'ghost' out and cannot be selected in the menu.

    2. when I open Firefox, I use a shortcut or go to the Web browser in any other way, multiple instances are open automatically. I suspect that the number of instances is the number of tabs that I left open in the previous session, but I'm not sure about this. They all open to a blank page, however and do not open Web sites that have been assigned to each tab in the previous session.

    Thank you for your help.

    You can check if the session restore is activated [1].

    It is possible that there is a problem with the sessionstore.js and sessionstore.bak files in the Firefox profile folder.

    Delete the sessionstore.js file [2] and sessionstore.bak in the Firefox profile folder.

    If you see files sessionstore-# .js with a number in the left part of the name as sessionstore - 1.js then delete those as well.

    Delete sessionstore.js will cause App Tabs and groups of tabs and all tabs open to get lost, so you will need to create them again (take note or bookmarks).

    See:

  • If the box is checked, SUM Qty of the reds only

    Column a: checkboxes

    Column B: colors (red, blue, green, etc.). [expression]

    Column C: quantity

    What I need the formula to do is... If the box is checked, SUM quantity of Red only.  In this case, the answer would be 35.

    What is the formula to calculate the which?

    cell B1 in the table on the right contains the formula:

    SUMIFS (Data::C, "Red", Data::A, TRUE, Data::B)

    shortcut for this is

    B1 = SUMIFS (Data::C, "Red", Data::A, TRUE, Data::B)

  • I am creating a total field contingent in a PDF form created by me which will only add cost in total ONLY if the box is checked.  Another disadvantage to this is one of the fields (number of monitors), I am eager to multiply by the field notes.

    I am creating a total field contingent in a PDF form created by me which will only add cost in total ONLY if the box is checked.  Another disadvantage to this is one of the fields (number of monitors), I am eager to multiply by the field notes, which is a field required number on there.

    All of them are select___

    Here are all the names of FQDN (towards the bottom):

    Check the boxes:

    • selectiPhone
    • selectSwipe
    • selectMonitor
    • selectDesktop
    • selectLaptop
    • selectiPadCell
    • selectiPad
    • selectPhone

    Fields of costs:

    • CostiPhone
    • CostSwipe
    • CostMonitor
    • CostDesktop
    • CostLaptop
    • CostiPadCell
    • CostiPad
    • CostPhone

    The notes field that will calculate this is "NotesComputer Monitor in notes". -It is a body of numbers forced the inability to put anything else in it.

    Then add them all in TOTAL COST

    Sorry for my ignorance: it's my first time doing a form like this.

    Please see below for the screenshot.

    2015-10-12_1411.png

    Dropbox - conditionalSum.pdf has the answer

  • TextField mutiply by value when the box is check

    Hi all

    I have a form, built in Adobe Acrobat X Pro, I create as a form of reparation with charges included in it.

    I know how to have a value filled in a text field when a check box is selected.

    My question is this.  I have a textfield labeled as "labor_hrs" which is a number format.  What I want to do is to have this box multiplied by a given value of populous 45.00 to the text field 'labor_chrg '.  Can I get this feature to work on its own.


    I want to do is only to be filled to the "labor_chrg" when the "billable" checkbox is checked.


    adobe.png

    Any help would be appreciated.

    A quick way is to set the export value of the checkbox "billable" 1.

    You can then use the simplified field notation script of:

    (labor_hrs * 45) * billable

    A custom JavaScript calculation:

    function GetField (cName) {}
    Returns the field with error checking object;
    oField var = this.getField (cName);
    if(oField == null) app.alert ("field of error for access to the"+ cName, 0.1 ");
    return oField;
    } / / end GetField function;

    Event.Value = (isNaN (GetField("billable").value) == false) * GetField("labor_hrs").value * 45;

    If you add a hidden field to the rate of work called "labor_rate", you can use the ' field is the product of the following fields: "and select the fields"billable","labor_hrs"and"labor_rate ".

  • Setting default value for selectOneChoice when the Page loads

    BPM JDev 11.1.1.5.0

    I have a selectOneChoice component bound to a BPM data control. You need to set a specific value as the default value when the page is loaded for the first time.

    I did the scope of the bean managed as pageFlowScope.
    Then created a variable of string in the bean called 'postal code' and its setter I wrote like:

    You can follow this approach as well. But when you call the countryCode setter? You must set the value of the variable string.

    Then, I used your code in the jspx page.

    You need to edit my code in the jspx you use a managed bean. The code will change as below.

    
       
           
       
     
    

    I was suggesting to use a variable of pageFlowScope as defined in my previous code snippet. And on pageload, set this variable. To find out how to write/execute java code before page loads refer to this post:
    http://www.baigzeeshan.com/2011/05/How-to-run-Java-code-on-every-page-load.html
    In the afterPhase of the post method, you can set the variable pageFlowScope as shown below.

    AdfFacesContext.getCurrentInstance().getPageFlowScope().put("countryCode", "IndiaIN");
    
  • reveal the pages when the box is checked?

    Hello

    I'm used to Acrobat Pro but new to LiveCycle. I need to hide several pages on a form until a user selects a check box. IE / user clicks on ' [x] category 1 ' and the page that contains the category content appears. If the user disables the check box, the page is hidden. IE / user erases [] category 1 and the page with the content disappears from the screen of the user.

    \i think it is called "revealing the page", but I'm not sure. Can someone point me in the right direction please?

    Thank you!

    Well, since I answered my own question, I thought I'd put the answer here just in case someone else can use it.

    First of all, some grumbling on LiveCycle: (you have to put up with this because this product is horrible and I had to pay a fortune to use...)

    • At that time, why pc only? I need only this one tiny but crucial function but was forced to borrow a pc and then buy a pc only (+ $ 300) software that I will use no doubt once again. All this should be feasible in Acrobat Pro with some scripts. (If your Google skills are best mine and you will find an answer, then please share it here and save the lives of others, the pain and the cost...)
    • Why is there a contempt of all feeling accepted, standard shortcuts - keyboard, mouse, and other methods of investment? Where is the ability to drag the guides of the leaders? Why can't hold the SHIFT key CTRL when dragging a form object to keep things lined up? BTW, ALT is how this copy - drag should be done - not CTRL. Where are the guides? Why, when I target an object in the generator of Actions I must scroll manually or collapse laboriously each page in the menu tree to obtain further to the bottom of the list? What a waste of my precious time and now unprofitable on this project.
    • I spent nice hours of creation of documents of approved customer in InDesign, only to discover that LiveCycle could not import my work in a way that preserves my layout, causing me to have to rebuild all my form elements. We are talking here of 9 documents and nearly 150 pages of provision of pain-staking, which had to be redone. And don't tell me that I should have used LiveCycle first. It should have been much more homogeneous than it was.

    Seriously, this product is expensive, not exhaustive, no standard compliant, similar to the use of Windows 95 in ways that no sane person should have to endure, but only pay for and put up with in 2014. Yes, Adobe high priests, I have in vain talk, knowing that this will fall indifferent, one ear deaf.

    OK - so here's the answer to my question. In summary, the steps to hide/reveal pages based on the user checking or unchecking a box are:

    1. Create the box by dragging the library of objects "Checkbox. Enter the question text and make sure that data binding name is unique for each instance. Let's say that all the elements of the box are on page 2 of the document. When the user selects the first box, three page turns. So, for this box, name it something like "CheckBox_Page3". Others would be called "CheckBox_Page4", "CheckBox_Page5" and so on.
    2. Select the first checkbox (let's stick with CheckBox_Page3 as our example.) and then right-click, choose Actions => add an Action (or Action change if there is an action already). The Action Builder dialog opens.
    3. I'm going to need two actions for each check box. One who says, 'If this box is cleared, then the page is hidden' and the other who said: "If this box is checked, then the page is visible." The Condition value: 'When the CheckBox_Page3 box is deselected' and the result of: show or hide a [HIDDEN] object. Then scroll down and select Page 3 in the left column.
    4. Set the action of the second so that the Condition is: "When the CheckBox_Page3 checkbox is selected" and the result of: "show or hide an object [VISIBLE]. Then scroll down again to select the Page 3.
    5. Browse all your boxes until all pages are put in place with a hidden/unchecked and checked/visible configuration.
    6. The last thing to do is to select all of the pages that will be hidden/shown in the left column. When this list is selected, visit the subform tab. Presence of the article and choose from the list: "Hidden (exclude from layout)." Now, the document will open with the appropriate, pages hidden from view, until the user selects the corresponding check box.

    Save OFTEN. Test carefully and on multiple platforms. Good luck.

    -Pete

  • Calculate values based on the boxes are checked - for Dummies...

    Hello and thank you all in advance for your help. I'm trying to calculate a value based on the boxes checked. Specifically, I would like to add a particular value $$ each CheckBox and if this box is checked, I want to add to the total rental value (see screenshot below):

    Screenshot (1).png

    As you can see in the screenshot that I have different areas that can be selected (first floor, court before, etc.), I want to assign a value to the checkbox of each region (and added value for others) and calculate a total in the "Balance of rental fees" less the deposit. I'm new with java and scripts but not know how to do it in an excel formula. I guess it's very different from what little I know of Java. Any help you can give me would be greatly appreciated.

    Calculation options are in the text field. In this screen, you only need to set the value of exports to the amount this box represents.

  • Firefox will not prompt to remember the password even if the box is checked to remember; also, I'm not in private browing mode.

    I go to tools > Options > Security and check 'Remember password' but after visiting another site and enter a password there is no prompt to remember then when I come back to the tool > Options > security, the box is unchecked. All of the suggestions.

    Thanks to you all for your suggestions. I discovered the cause of the problem and that's because I had installed Xfinity constant guard and it was Zap all saved passwords and unchecking the box of Firefox options.

    After that I uninstalled it, Firefox works normally.

  • my 8.0.1 firefox does not save, or ask me to save passwords (even if the box is checked)

    Windows 7 Home Premium SP1 64-bit operating system
    Firefox 8.0.1
    I duly ticked the relevant box but still Firefox not save / she asks me to save any password whenever I have access to a site that requires identification: it forces me to repeat to every time the password.

    Make sure that you are not Firefox running in permanent private browsing mode.

    To view the history settings and cookies, choose:

    • Tools > Options > privacy, choose the setting Firefox will: use the custom settings for the story of
    • Uncheck the box: [] "always use the navigation mode private.

    The Web site may use autocomplete = off to prevent Firefox to record the name and the password.

    You can remove autocomplete = off with a bookmarklet to register the name and the password of Firefox.

  • my pc clock keep time in hours and minutes. The box is checked to address the DST. What else could be?

    I have windows xp.  My clock keeps losing time in minutes.  I continue to challenge and continues to waste time.  I know that this is not because of the DST.  I have the box checked to change daylight saving time.  I've updated.  Nothing works.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-performance/the-clock-wont-keep-the-current-time/dff4a031-12f8-412d-9a58-3fecc3ea3120

    There are a few solutions in the thread above, most saying that your battery needs to be replaced.

    For instructions on how to replace the battery or look in the manual of your pc if you go to your manufacturers Web site.

  • Widget certificate ignoring the boxes to check and TEBs

    I use a certificate widget after a quiz/simulation. My widget certificate marks only the question slides in my quiz. It ignores the boxes click and TEBs which are related and are noted on the results page. If I get a pass on the results page and a failure on the certificate!
    Is there a reason for this?
    Thank you

    Hello
    Sorry for this question but it's a limitation. The variable we use in the certificate Widget is unable to take the scores of objects like boxes click & TEBs.

  • When a box is checked, insert text in another field

    Hello

    I know there has been a lot of another thread like this one, but for some reason that my code does not work.  I try to have text in a field when a check box is selected.  Can you please please help.

    For a mouse an event:

    var dateCheckbox = this.getField ("Date or");  checkbox

    var detailField = this.getField ("expiry details");  field

    If the "date or" is checked that change details of Expiration 'Hello '.

    If (dateCheckbox.value == 'Yes') {}

    detailField.value = "Hello";

    }

    Which mouse-up event do you use? In general, when you try to trigger something based on a selection of the checkbox, you should also take care of the disabled value. In addition, the value of exports of a checkbox control can be changed, is usually a better approach to check the value! = 'Off', because 'Off' will always be used if not controlled.

    Try the following as the event of mouse-to the top of the "Date or" check box:

    var detailField = this.getField("Expiration Detail");  //field
    if (event.target.value != "Off") {
        detailField.value = "Hello";
    }
    else {
        detailField.value = "";
    }
    
  • If the box is checked value = '0' If is not checked value = "1"?

    Hi all

    I try to get my box feature to work depends on whether or not the checkbox is enabled. If I click on the checkbox and proved I should send the value = '0' with my Ajax call. In other cases, if I unchecked I should send it my value '1' with my Ajax = checkbox. Here is the code I have so far:

    < td > < input type = "checkbox" name = "block" id = 'block' onChange = "updateTable('#CustomerID#')" > < table >

    function updateTable (CustomerID) {}

    If (document.getElementById('block').checked == true) {}

    blocked var = 0;

    var whObj = {"url":"/apps/StudentAdmin/ParentTeacherConfScheduler/PTCAjaxFunction.cfc?method=UpdateSc send & returnformat = json"};

    gwAjaxPost(whObj,{"CustomerID":CustomerID,"blocked":block},Result);

    } Else if (document.getElementById('block').checked == false) {}

    unlocked var = 1;

    var whObj = {"url":"/apps/StudentAdmin/ParentTeacherConfScheduler/PTCAjaxFunction.cfc?method=UpdateSc send & returnformat = json"};

    gwAjaxPost(whObj,{"CustomerID":CustomerID,"unblocked":block},Result);

    }

    }

    This code above always have the value 1. It doesn't matter if I have checked or unchecked the check box. I don't know why, if anyone sees where is my code breaking or if you know a way how I can send different values please let me know.

    Is it your intention to do this instead, that is, pass arguments CustomerID and block to the CFC.

    function updateTable (CustomerID) {}

    If (document.getElementById('block').checked == true) {}

    blocked var = 0;

    var whObj = {"url":"/apps/StudentAdmin/ParentTeacherConfScheduler/PTCAjaxFunction.cfc?method=UpdateSc send & returnformat = json"};

    gwAjaxPost (whObj, {CustomerID:CustomerID, block: blocked}, Result);

    } Else if (document.getElementById('block').checked == false) {}

    unlocked var = 1;

    var whObj = {"url":"/apps/StudentAdmin/ParentTeacherConfScheduler/PTCAjaxFunction.cfc?method=UpdateSc send & returnformat = json"};

    gwAjaxPost (whObj, {CustomerID:CustomerID, block: unblocked}, Result);

    }

    }

  • does not check messages when the box is checked

    Spin worm TB 38.2.0 on Windows 10. A check to check for new messages every 5 minutes in the server settings. He does not. Must hit receive messages to retrieve new messages. How can I fix it?

    Matt. I solved the problem by returning to the 38.1 version. Must be a bug in 38.2. Thanks for your thoughts.

Maybe you are looking for

  • 2 lichtnetadapter of 85 W MagSafe

    Mijn MagSafe 2-lichtnetadapter 85 W Macbook pro retina 15' niet meer op mijn laadt! Wat kan ik doen?

  • Merge XML as a automatic Script files

    Hey!I had several xml files and you want to merge... they're all like that with different information.->     CLASSICA        VH1 Classic     Bach, Partiten für Violine solo     Solist Instr.: Gidon Kremer (Violine), Bildregie: Daniel Finkernagel, Ale

  • problems reinstalling Vista, error code 0 x 80070017

    Hi help someone can help you. I'm selling my pc and wiped the hard drive by using the drive to kill her. The problem is now when I try to reinstall, I get the error message - windows cannot install required files. The file is corrupt or missing. Make

  • Inspiron 5548 disconnects every time that I add/remove a second monitor

    I have a new 5548 Dell Inspiron running Windows 8.1, and I noticed whenever I change the configuration of the monitor the system disconnects me. This will happen if I connect a new monitor and change the configuration of "duplicate" to "extend" or if

  • Emergency aid necessary to cross Busine

    Hi guys,. I'm going through contacts in the categories of cases could help pleazse. contactList = (ContactList) PIM.getInstance () .openPIMList (PIM. CONTACT_LIST, PIM. READ_ONLY); Gets all of the contacts in the Business category Enumeration busines