Execute Apply in checkbox in Javascript

Good day,
I have a WAD template that has an Analysis Item, a checkbox and a button. When the button is clicked an Javascript is executed that checks if any of the checkboxes are checked,  if none are checked then all are then checked via the Javascript, the only problem I now have is how do I simulate the executing of the apply button in the Javascript function.
Regards
Lucien
Edited by: Lucien Barnes on Sep 18, 2008 7:10 AM
What I need is the function that is executed when the button is clicked i.e. what is function the is executed by OnClick

Good day,
Solved the problem
I used the following code.
// Get the apply button
var button_checkboxes = document.all(web_item_checkbox_group + "_BIBtnCBG");  
// Simulate click.
button_checkboxes.click();

Similar Messages

  • How to execute a exe file using javascript on app window.load.

    How to execute a exe file using javascript on app window.load.

    Hi sb00349044,
    As I have already mentioned in multiple replies to your previous questions, the SUMO forums focuses on providing help to end users with usage-questions and issues.
    For developer-related questions, please refer to one of the many resources readily available that I have linked to in the past:
    * [https://developer.mozilla.org/en-US/Firefox_OS MDN]
    * [http://stackoverflow.com/questions/tagged/firefox-os StackOverflow]
    * [https://lists.mozilla.org/listinfo Mozilla Mailing Lists]
    - Ralph

  • A "preview" checkbox with JavaScript

    Hi friends.
    I´m writting a JavaScript that sends the active document in an appropriated way to print. Before calling the print command, I wanna display a dialog box asking the number of copies to print. So I thought I could also use this box to show some "auto" adjustments options (for example "auto levels"). If the user active "Apply auto-levels" then image refreshes to show the result (like a live preview). If user disables this box, then auto levels must be retired from image.
    Well..hope you do not laught on my solution. The way I found to do it is..apply auto levels and refresh when user enables the field, and return in the history and refresh if the user disables this field. It get the expected result. BUT, if I have more checkboxes in the same dialog box, then this solution will not work so well (sure).
    Do you have any other consistent solution to have previews of commands, but retire if the user disables the field?? Would like to learn a little about it.
    Well..what I do (the solution I´ve mentioned above) is:
    var doc = app.activeDocument;
    var c = doc.activeLayer;
    var dial = new Window ("dialog", "Print", undefined, {closeButton:false});
    dial.orientation = "column";
    dial.alignChildren = "fill";
    dial.margins = 20;
    var dPanel = dial.add ("panel", undefined, "Print options:");
    dPanel.orientation = "column";
    dPanel.alignChildren = "left";
    dPanel.margins = 15;
    var aLevels = dPanel.add ("checkbox", undefined, "Apply auto levels");
    var dGroup = dial.add ("group", undefined);
    dGroup.orientation = "row";
    dGroup.alignChildren = "left";
    var st = dGroup.add ("statictext", undefined, "Copies:");
    var nField = dGroup.add ("edittext", undefined, "1");
    nField.characters = 10;
    var gButtons = dial.add ("group", undefined);
    gButtons.orientation = "row";
    gButtons.alignChildren = ["right", "right"];
    var exe = gButtons.add ("button", undefined, "Execute", {name:"ok"});
    var canc = gButtons.add ("button", undefined, "Cancel", {name:"cancel"});
    aLevels.onClick = function (){
        if (aLevels.value){
            c.autoLevels();
            app.refresh();
        else
        if (! aLevels.value){
            doc.activeHistoryState = doc.historyStates[doc.historyStates.length-2];
            app.refresh();
    dial.show();
    Any idea to forget all of this and make a real "preview" checkbox?

    Hello Gustavo,
    I've been using (or seen using) preview in a couple of ways:
    1. Nesting when possible adj.layers into Groups and toggling their visibility and/or using smart filters on smart objects;
    2. Adding, and switching from, history states. Which is handy because you don't toggle only between original and "filtered", but if the UI of your script permits it, between original, "filtered with settings #1", "filtered with settings #2", etc. giving to users the extra feature of comparison.
    An option similar to #2 (that I've adopted when the processing is particularly elaborate) is to duplicate the original doc, work on it and paste back the result as a new layer. You can use the same strategy of multiple settings previews there too, but without the need to resort to snapshots.
    I've been working for a while on an embedded preview (in the ScriptUI window) but never found a robust workflow for it.
    Cheers
    Davide Barranca
    www.davidebarranca.com

  • Apply watermark and then apply Flattener Preview via JavaScript

    Hello all,
    I have a bunch of PDF files which were generated from InDesign.
    Currently I am applying a watermark to all the PDFs in Acrobat XI and then a flattener preview to all of the PDFs manually one PDF at a time.
    I want to make a script which does all this.
    I also tried the Action panel, but it didn't automate the flattener preview part.
    I am comfortable with JavaScript and scripting in general.
    Any help or a pointer to resources will be appreciated.
    Thanks and regards.

    Thanks for replying.
    The flattener preview is located under "Print Production" panel. Where one can configure the text flattening options, among many other settings.
    I want to flatten the text (convert it to outlines) via JavaScript as you have suggested.
    Please suggest any sample code.
    Thanks and regards.

  • How to execute preflight profile using Acrobat Javascript

    Execute a pre-flight profile using acrobat javascript and  call that function in VB.Net.

    See: http://help.adobe.com/livedocs/acrobat_sdk/10/Acrobat10_HTMLHelp/wwhelp/wwhimpl/common/htm l/wwhelp.htm?context=Acrobat10…

  • Accessing HTMLB checkbox in javascript

    Hi,
    I have the following scenario:
    1) jsp "main.jsp" has a checkbox with id="chkBoxId"
    2) In this "main.jsp" at the end, there is a jsp include
       including another jsp "buttons.jsp" - which contains a
       SUBMIT button.
    3) On this SUBMIT button, I am calling a javascript
       function "check()" in the "onClientClick" attribute.
    4) In this "check()" function I want to access the
       checkBox (present in "main.jsp")
    Now when I try doing this using the following code in the check() function, it gives me a "Undefined is null or not an object".
    function check(chkBoxId) {
    var funcName = htmlb_formid+"_getHtmlbElementId";
    func = window[funcName];
    var chkBox1 = eval(func(chkBoxId));
    // The checkbox is obtained
    if (chkBox1)
      alert("Not Checked");
    Plzz help me !!!
    regards,
    Jitendra

    HI,
    U can write the javascript function in the header tag or create a .js file in which u write the javascript code.
    the javascript code can be like
    function ValidateForm()
    if(document.form1.s_material.value=="")
    alert("enter material");
    return false;
    return true;
    where form1 is id of form and s_material is iD of input field.
    In your coding for button onClientClick like :
    <htmlb:button  id="s_but_submit"
                                       width="20"
                                       onClick="submit"
                                       onClientClick="if(!ValidateForm(this))htmlbevent.cancelSubmit=true;"
    Regards,
    Siddhartha

  • Checkbox with javascript unexpectedly unchecks other checkboxs

    Hi,
    I have a checkbox called applicant_isemailaddress which has onchange javascript
    if (this.rawValue) {Page1.doYouEmail.presence = "visible";Page1.applicant_allEmailAddresses.presence = "visible";}else {Page1.doYouEmail.presence = "hidden";Page1.applicant_allEmailAddresses.presence = "hidden";};
    when checkbox applicant_isemailaddress goes to the "on" state, then two other checkboxs on the page get unchecked.
    they are called applicant_isMaleSex and applicant_isFemaleSex, I've tried changing the names to no benefit.
    removing the above javascript fixes the behaviour
    whats the trick??
    tia.
    Brian

    its possible I am a newbie.
    I put the whole page in the masterpage page1.
    moving it to page1 as a page, not a masterpage, it works well.
    thanks for comment, it did make me think further what was I doing wrong.

  • Checkbox and javascript onClick

    I have defined an sql region with the following query:
    SELECT HTMLDB_ITEM.CHECKBOX(1,serviceid) " ",
    servicedescription
    FROM service
    where coid = :P1_COID
    ORDER BY 2
    Although I read a few threads and Howtos about Javascript I didn't achieve my goal to redirect (submit) the page to itself everytime the checkbox is changed. I tried to manage this by setting
    onClick="javascript:doSubmit('Submitted');"
    in the element attribute of the serviceid column but with no success.
    Besides this I would like to analyze which checkbox (service) is checked. According to the selected services different regions should be shown/hidden on the page. May be someone could point me to the right direction.
    Thanks Tobias

    I solved it by myself...
    Tobias

  • Refresh HTMLB checkbox by JavaScript

    Hi all, I have two HTMLB checkboxes on the browser(IE6.0).
    I would like to selecte one of thses and set the other one
    checked or unchecked. I can get the checkbox's ID on the client side. I can display the boolean value if the checkbox is checked or unchecked. But I can not set the checkbox checked or unchecked and let it displayed. The Javascript code on client side is shown as below:
    // ckid - id of the target checkbox,
    // myContent - objct of PageContext
    // test() is triggered by one of the two chechboxes
    //String ck_id=myContext.getParamIdForComponent(ckid);     
    <script language="JavaScript">
    function test()
       var myval = document.getElementById('<%=ck_id%>');
       alert(myval.checked);
       myval.checked = true; 
    Any hint will be appreciated.
    Best regards.
    Wang

    Hi Dagfinn, thanks for reply. My code is as follows, the missing 'e' is my typing error,
    String s2 = "<script>"
    +"function toggle1(){"
    +"document.forms[\'myForm\'].checkbox1.checked=!document.forms[\'myForm\'].checkbox1.checked"
    +"}"
    + "function toggle2(){"
    +"document.forms[\'myForm\'].checkbox2.checked=!document.forms[\'myForm\'].checkbox2.checked"
    +"}"
    +"</script>"
    +"<body>"
    +"<form name=\"myForm\">"
    +"<INPUT TYPE=CHECKBOX NAME=\"checkbox1\" onClick=\"toggle2();\">Check me1</input>"
    +"<INPUT TYPE=CHECKBOX NAME=\"checkbox2\" onClick=\"toggle1();\">Check me2</input>"
    +"</form>"
    +"</body>";
    getForm().addRawText(s2);
    The error message happens to both of them when they are clicked.
    Thanks for reply.
    BR.
    Wang

  • Controll HTMLB:Checkbox via JavaScript

    Hi all,
    I`ve created a BSP application containing HTMLB:Checkbox components.
    In this example the checkboxes are organized as a three of 2 levels.
    When clicking/checking the parent checkbox, I want the rest of the checkboxes (children) to change status depending on their parent's status. e.g checked=true/false and disabled=true/false. The checkboxes become disabled/enabled, but you cannot see any change in their checked/unchecked status.
    Though this works fine with design="classic", it doesn't when using design="design2003"...
    I have to use design2003 in my application, and want to use HTMLB:Checkbox instead of regular HTML Checkbox- which also works.
    The javascript syntax follows:
    (it's from a loop containing all the children checkboxes)
    nodeEl = elements<i>;
    nodeEl.checked = true/false;
    nodeEl.disabled = false/false;
    I would have appreciated any kind of help.
    Ogert

    This is my intire code, Raja T. The Javascript works fine with regular HTML Checkbox, or HTMLB:Checkbox combined with classic design.
    **HTML CODE
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <%<htmlb:content design="classic">%>
    <htmlb:content design="design2003">
      <htmlb:document>
      <htmlb:documentHead>
      <script language='javascript' src='control_checkbox.js'></script>
      </htmlb:documentHead>
        <htmlb:form>
    <table width="309" border="1">
      <tr>
        <td width="299" bgcolor="#999999">
        <htmlb:checkbox id        = "E1"
                        text      = "Parent"
                        checked   = "true"
                        onClientClick = "check_chkbox('E1');"/>
        </td>
      </tr>
      <tr>
        <td><htmlb:checkbox id        = "00111820|Chk0102|E1"
                        text      = "Child 1.1.1.2"/>
        </td>
      </tr>
      <tr>
        <td><htmlb:checkbox id        = "00111820|Chk0103|E1"
                        text      = "Child 1.1.1.3"/>
        </td>
      </tr>
        </htmlb:form>
      </htmlb:document>
    </htmlb:content>
    **Javascript Code:
    var forms;
    var elements;
    function check_chkbox(id) {
      var el;
      var nodeEl;
      var splitname;
      var ind = 2;
      var name = id;
      var tempname = split_name(id,'',ind);
      if(tempname != '') {
        ind = 1;
        name = tempname;
      getCheckBoxes();
      el = document.getElementById(id);
      if(!eval(el.checked)) {
        for(i = 0; i < elements.length; i++) {
          splitname = split_name(elements<i>.id,name,ind);
          if(splitname != '') {
            if(elements<i>.id != id && name == splitname) {
              nodeEl = elements<i>;
              nodeEl.checked = false;
              nodeEl.disabled = true;
      else {
        for(i = 0; i < elements.length; i++) {
          splitname = split_name(elements<i>.id,name,ind);
          if(splitname != '') {
            if(elements<i>.id != id && name == splitname) {
              nodeEl = elements<i>;
              nodeEl.checked = true;
              nodeEl.disabled = false;
    function split_name(name,splitname,ind) {
      var split_array = name.split("|");
      var size = split_array.length;
      var string;
      if(size == 3) {
        if(splitname != '') {
          string = split_array[ind];
          array = string.split(splitname);
          if(array[0] == '') {
            return splitname;
        string = split_array[1];
        return string;
      return '';
    function getCheckBoxes() {
      var tempArray = new Array();
      if(elements == null) {
        tempArray = document.all;
    <%--    case Firefox, Netscape --%>
        if(tempArray == null) {
          forms = document.forms;
          tempArray = forms[0];
        elements = new Array();
        for(i = 0; i < tempArray.length; i++) {
          if(tempArray<i>.getAttribute("type") == "checkbox") {
            elements[elements.length] = tempArray<i>;

  • How to execute  a batch file using javascript

    Hi,
    I dont know java. i have a batch file to do my task. Im designing the front end with HTML.Can anyone tell the command to execute batchfile using javascript
    Message was edited by:
    viswanath_java

    Java and not JavaScript are not the same thing or even close to the same thing. You appear to be in way over your head. It might be a good time to fess up to your employer that you are underqualified.
    Apart from the JavaScript faux pas your question is also lacking because
    - you don't identify what this batch file is or does or needs to execute in
    - it is very difficult to understand how the front end for this will be HTML
    It seems you may one day want something like a Servlet. But you are long way from implementing this solution.

  • Execute a PHP file in Javascript script

    Hi,
    I'm working on a web base application, and I need to execute a PHP file in a script written in Javascript (InDesign).
    I only need to "open" this file (like a page in a Browser), I don't need to work with it. I only need to have that page executed.
    Someone can provide help, please?
    Thanks and best regards.

    Answered in the InDesign Scripting forum.

  • Highlighting a checkbox using Javascript

    I have four checkboxes on my form. I would like to highlight and change the size of a checkbox when it is selected using Javascript. Any help/input is greatly appreciated.

    You can use something like this as the MouseUp event of the field:
    if (event.target.value=="Off") event.target.strokeColor = color.black; else event.target.strokeColor = color.yellow;

  • Checkbox value javascript

    I have a form with:  2 text fields (A and B) and a checkbox
          and criteria values X and Y (these values aren't explicitly entered but hidden in the eventual javascript)
    I can't figure out how to do this on Adobe Acrobat using the javascript.
    User enters a value for text field A (a numerical value)
    if the checkbox is checked then if the value of A is greater than X, text field B = 1
    if the checkbox isn't checked then if the value of A is greater than Y, text field B = 1
    I'm hoping to have this done real time (thus not waiting for the form to be submitted).

    A check box or group of check boxes with the same name and different export or optional values, exclusionary group, has the value of the field name when selected or the string value of "Off" when not selected. There is also a check box field method of "isBoxChecked" that can check the individual widget in an exclusionary group.
    You have not described all the possible conditions for the problem. What is the value of field B when A is less than or equal to X and the check box is checked or not checked.

  • Scripting & Applying Set Percentage in Javascript

    I need to script a set percentage to an existing calculated total field in order to show a new field total with the set percentage applied. Total is already calculated in the form, but I'm not sure how to plug in the 2.25% to calculate for a final total.
    Example:
    Total ____
    Final Total ____ (new field with 2.25 percentage applied)

    Robert,
    Great – thanks! I did figure that out (eventually), but now have the issue of the Permit Fee field showing $0.26 when it should just show $0.00 until the Number field is filled in and the amount is calculated. Can you help? The error screen says that it doesn’t like the last equal sign. I’m at a loss…
    TopmostSubform.Page1.Cell[10].Permit_Fee::calculate - (FormCalc, client)
    Permit_Fee.rawValue = (4000.00Cell[8].Number + 0.25)1.0225
    If(Number.isNull | Permit_Fee = “”)
    Thanks!
    Noemi Harvell

Maybe you are looking for

  • Hard drive crashed - how to import my data back to itunes?

    my hard drive crashed. I reload windows, install itunes, but when i connect iphone it wants to delete everything off it. oddly enough it imported the photos. why cant it jsut import everything? the reason why i dont want to wipe it and start over is

  • Outlook doesn't want to connect with OSX Server on 2 out of 3 clients

    I have three computers on which I have installed Outlook 2011.  All three are running Mavericks.  On one of them, a MacBook air, I have established an outlook account connecting to my OSX server with no problems.  On the other two computers when I se

  • Is Automation possible in SAP BW

    Hi,   I am working in BW testing (manual testing).Is there any way that BW automation testing (like using ECATT, QTP tools)can be done? Can anyone help me out in this.

  • B2B purge fails to remove some instances

    Ran the ant script B2B purge and also attempted to run B2B_PURGE_INSTANCE_MSGS stored procedure using ( call b2b_purge_instance_msgs('2011-05-12 00:00:00','2013-07-01 23:59:59',null,null,null,null,null,null,null,null,'true',null,null); but some insta

  • Help with Adobe Premiere Elements 8.0

    Hello! I recently began fooling around with Premiere elements and I had a couple of questions about it:  First, if you could please watch this video:  http://www.youtube.com/user/iTerabithia#p/search/6/01qfQSyq1WI      In the almost beginning it show