With Radio buttons set point values

I have a radio button that will have either the value of 1 or 2.
I have 2 items page, one is a selection list and the other a text field.

What I have to do is, if the radio button value = 1, the select list must be set to 1 and the text field should be disabled.

I can't disable the text field with no problem using

[function NMTRadio (pThis) {}
Test = pThis.value is '1'
html_disableItems, 'PXX_PRICE');
}
]
[onChange = "javascript:NMTRadio (this);] »

I can't change the value of the selection list. I've tried several things, but to no avail.

See you soon

Gus

Gus,

Try this:

function NMTRadio(pThis) {
  if(pThis) {
    var lVal = $v(pThis);
    if(lVal == 1) {
      // If radio value is equal to 1...
      $s('P1_SELECT', 1);
      $x_disableItem('P1_TEXT', true);
    } else if (lVal == 2) {
      // What do you want to do when the radio is equal to 2...

    }
  }
}

Also, you don't need the "javascript:" prefix in the Manager of "onchange". This prefix is used only when JavaScript is called on a URL.

It will be useful.

Ant.

Tags: Database

Similar Questions

  • Dialogue with radio buttons

    Honourable experts,

    I'm on Win7 64 bit, CS6 (ID 8.1.0.420).

    Script of skills - somewhere in the "Very basic" level

    Now try to adopt, my needs, a dialog box with radio buttons, as in Script UI v2-2 Peter Kahrel, pdf, page 17:

    var w = new Window ("dialog");
    var radio_group = w.add ("panel");
    radio_group.alignChildren = "left";
    radio_group.add ("radiobutton", undefined, "InDesign");
    radio_group.add ("radiobutton", undefined, "PDF");
    radio_group.add ("radiobutton", undefined, "IDML");
    radio_group.add ("radiobutton", undefined, "Text");
    w.add ("button", undefined, "OK");
    // set dialog defaults
    radio_group.children[0].value = true;
    function selected_rbutton (rbuttons)
    {
    for (var i = 0; i < rbuttons.children.length; i++)
    if (rbuttons.children[i].value == true)
    return rbuttons.children[i].text;
    }
    if (w.show () == 1)
    alert ("You picked " + selected_rbutton (radio_group))
    

    My version is designed for operation on the text selected (with the text tool). And here's the problem.

    After selecting the text with Ctrl + A, or shift + end or Ctrl + Shift + end - then - hit KB shortcut assigned to the script I usually 'loose' the mouse pointer. It is still there, but turns out is invisible on the entire InDesign window. "Usually" means approximately 5-6, 10 times... Who escapes from the script window and still hit the shortcut script works - next try mouse pointer remains visible. Until you select another part of the text...

    If the text has been selected with the mouse - or - script is invoked by double-clicking its name in the actions palette, everything goes well, always. Also works well with other types of selection.

    Changing shortcut KB has no effect.

    Replace a mouse has no effect. Microsoft (wired) and mouse optical Logitech (wireless) tested.

    However:

    on a system that is completely up-to-date (Windows 10 Pro N, 1511 version, build 10586,63 x 64 / InDesign CC 2015.2, to build a 11.2.0.100 x 64) it works - there is no mouse pointer disappears.

    Have not the opportunity to test on any other configuration now.

    Could someone confirm this mouse related volatility on Win7/CS6, or is it quite unique in my system?

    And another question:

    Is it possible to activate here cycling through radio buttons to arrow keys, as he works in the script of this Marc Autret?

    http://www.Indiscripts.com/post/2009/09/clean-up-your-pasteboard

    He would let me live with the 1st problem unsolved... Anyway, the keyboard-based workflow is preferable.

    Behold, this is my version changed so far. However, it comes in the same way as described above.

    w=new Window("dialog", "Code");
    radio=w.add("panel", undefined, "Choose Action");
    w.alignChildren="fill";
    radio.optionbtns=radio.add("group");
    radio.optionbtns.orientation="column";
    option1=w.add("radiobutton", undefined, "Action One");
    option2=w.add("radiobutton", undefined, "Action Two");
    option3=w.add("radiobutton", undefined, "Action Three");
    option4=w.add("radiobutton", undefined, "Action Four");
    option1.value = true;
    w.add ("button", undefined, "OK");
                if (w.show() == 1){  
         if (option1.value == true)  
         {alert("Action One!"); exit();};
         if (option2.value == true)  
         {alert("Action Two!"); exit();};
         if (option3.value == true)  
         {alert("Action Three!"); exit();};
          if (option4.value == true)  
         {alert("Action Four!"); exit();};  
        }
    {  
        exit();  
        };
    

    Your comments are greatly appreciated.

    Except the upgrade - this isn't an option so far, sorry, Adobe...

    Hello

    small changes, try this:

    var
      w=new Window("dialog", "Code"),
      radio=w.add("panel", undefined, "Choose Action"),
      option1=radio.add("radiobutton", undefined, "Action One"),
      option2=radio.add("radiobutton", undefined, "Action Two"),
      option3=radio.add("radiobutton", undefined, "Action Three"),
      option4=radio.add("radiobutton", undefined, "Action Four");  
    
    w.add ("button", undefined, "OK"); 
    
    option1.value = true;
    radio.alignChildren="left";
    radio.margins = [10,20,10,10];
    
    function handle_key (key)
    {
      var
      scope = radio.children.length,
      p, newPos, step;
      switch (key.keyName)
      {
      case "Up": step = -1; break;
      case "Down": step = 1; break;
      default : return;
      }
      for (p = 0; p < scope; p++)
      if (radio.children[p].value) {
      newPos = p + step;
      switch (newPos) {
      case scope: newPos = 0; break; // go to first
      case -1: newPos = scope - 1; // go to last
      }
      radio.children[newPos].value = true;
      break;
      }
      } // handle_key
    
    w.addEventListener ("keydown", function (k) {handle_key (k)});
    
    if (w.show() == 1){
         if (option1.value) alert("Action One!");
         if (option2.value) alert("Action Two!");
      if (option3.value) alert("Action Three!");
      if (option4.value) alert("Action Four!");
        }
    else {
        exit();
        };
    

    Can't help you with strange behavior mouse (no idea)

    Jarek

  • I want to build a form with radio buttons to customers limited checking all the options.

    I want to build a form with radio buttons to customers limited checking all the options. I have a range of products and to quote accurately, I want to get specific information.

    If I get this, what you want to display the shape options to specific customers, not to all the viewers of the site?

    You must create a secure area where authorized viewers can connect and view the form with all the options, form itself we can not set up since what few customers are going to see other options and others are going to see another.

    This is possible since the end of your accommodation. Or if you are using Adobe server for hosting, then you can create profiles for clients and then set up another form altogether to achieve this goal.

    Thank you

    Sanjit

  • Using switch and case with Radio buttons

    Can I use the case switch with radio buttons?

    What will be the parameter to determine the choice like xfa.event.newText is used for the drop-down list.

    Aditya

    Hi Aditya,

    Select the exclusion group in the hierarchy (you have no script each option button) and select the click event. The switch statement would use the this.rawValue.

    Hope that helps,

    Niall

  • The use of JavaScript with radio buttons selected to assign a variable a value

    Hey everyone, a little new in Java and try to create a form for my work to request leave.  My problem is that I'm trying to assign a variable a value if the user clicks on a radio button or another.  Currently, they are incompatible with the following information:

    Name: Radio

    ToolTip: choice

    Button Style: check

    Radio button choice: Yes (this is the value of exports, that I think that I'm not sure how to use it correctly)

    nor is checked by default, but if a box is checked, I would have a variable defined on the "Approved" text, and if the other radio button is checked I would define the variable contains "disapprove".

    Here is my code now and thanks in advance for all the help:

    var S_auth;

    function auth() {}

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

    var S_auth = "approved";

    }

    else {}

    var S_auth = 'denied ';

    }

    }

    var employees = this.getField("Emp_Name").value;

    Supervisor of var = this.getField("Supervisor").value;

    var Leave_Type = this.getField("Dropdown2").value;

    var cToAddr = [email protected];

    var cCCADDr = this.getField("Email").value;

    var cBenAddr = this.getField("Sup_Email").value; If (cBenAddr! = "") cCCADDr += ';' + cBenAddr;

    var cSubline = "Re: leave request form for" + "" + employee + ', ' + Leave_Type + ', Status: "+ S_auth;"

    cbody var is 'your request for leave was' + S_auth + 'by' + supervisor. \n' + 'save the attachment of e-mail for your records. \n » ;

    this.mailDoc({)

    bUI: true,

    cTo: cToAddr,.

    cCc: cCCAddr,.

    bassujetti: cSubLine,

    CMSG: cbody

    });

    I honestly just want to have the subject line and the body to be able to show approved or disapproved according to which radio button, the project manager chooses.

    Yes, your script is now correct and should work.

  • With JQuery set point values


    http://apex.Oracle.com/pls/apex/f?p=23185:1 workspace: SVK user: demo password: demo

    I want the X, Y of elements to fill when the mouse clicks on the image.

    (* 1) JQuery my method is not setting the values, even if the alert displays the values.*

    {$(document) .ready (function ()}
    {$('img').click (function (e)}
    var offset = $(this) .offset ();
    *$s ("P1_X_COORIDNATE",(e.pageX-offset.left)); *
    *$s ("P1_Y_COORIDNATE",(e.pageY-offset.top)); *
    alert ((e.pageX-offset.left) + ',' + (e.pageY - offset.top));
    });
    });

    (* 2) it seems that the initial click is not working. It's the second click before the runs.* method

    check the spelling of your items:
    P1_X_COORDINATE
    P1_Y_COORDINATE

  • Pop - up screen with radio buttons

    Hello
    I am a new on APEX and I have a requirement for the creation of the popup page with two radio buttons.
    It must be that this pop pop before the departure/homepage. The user must select at least one of these radio buttons and then it goes back to the start/homepage without condition.


    Thank you
    Manoi.

    Hi Eric,.

    OK - the user ended up with the login page and has not yet loaded page 1. Therefore, there is no page on screen, which is not possible :D

    What you can do, is something like the following:

    1. in your application, thanks to shared components, create an element of Application called, say, G_OK_TO_CONTINUE

    2. on your 1 page, create a new branch. The branch to this Point should be set "on load: before the Header ' (is the point before any rendered page starts). The page points to would be your "popup1" (except that this should probably be a normal page, instead of a popup). The terms section for this branch would have the following parameters:

    Condition Type: Value of element in the Expression 1. Expression 2 =
    Expression 1: G_OK_TO_CONTINUE
    Expression 2: 1

    3. on your "popup1" page, you should then have a branch that directs the user to page 1. This branch must assign G_OK_TO_CONTINUE 1 (use the "these elements the value" / "with these values" settings on the branch to do) otherwise, you create a loop.

    For example, when the user first connects, Apex trying to load page 1. The new branch is checked immediately and, as G_OK_TO_CONTIINUE is NULL at this point (and, therefore, is not equal 1), the branch will be triggered and the user is redirected to your page "popup1". They do what they can do on this page and, if you actually go to page 1, the branch back to page 1 sets G_OK_TO_CONTINUE to 1, the new branch on page 1 verifies this and because the condition is false, the branch is not triggered and the user goes to page 1

    Andy

  • jdev11 - how the code filter additional liaison with radio buttons?

    Using JDev 11.1.1.0.2, ADF BC for model, ADF Faces JSF to view, deploy to WebLogic 10.3 appserver, database Oracle 11

    I asked for help (a do my work ask), that I'm the only developer JDev in our shop, and I looked at this problem too long and now have obscured the problem. I don't really want the answer (rather the skills needed to solve this problem), but it will ;-)

    Installation program:
    ExecwithParam base where the logic is stored in the AppModule. At this point, there is only a single binding TechID variable, which is passed to four of your different and updates the where clause and calls on each VO of the AppModule executeQuery. Works great so far!

    Need:
    Add additional time based filter: Group of buttons on the Radio for the last 30 days, 60 days, 90 days, choose a date. If choosing a date is sΘlectionnΘe, then the user selects a date with a date picker, and all records by this date are used.

    Support:
    There is a date variable in each query, and a common type of DATE filterDate may be added to each to filter with somedatefield > =: filterDate in each VO

    Thoughts:
    I like to break things in simple parts, so how about starting just the radio button.
    My thinking goes like this:
    Add another variable of filterDate liaison to each of your. Add this to the App Module.

    So, how can I set up a radio button so that I can get the value of the selected and then button that convert a SYSDATE - value and which use th e App Module logic? I continue to think of the big picture end of case and forget everthing. I know that's not difficult, but just ask me for some advice.

    At one point, I was thinking to add a clove of support to the option button, then wasn't sure if it was the best way and don't know how I would get the value in the AppModule. Part of the problem is that I came across a mental block. If I add the components that aren't linked data, as a selector of dates, or checkboxes, radio buttons, etc.. How can I get the values in the AppModule? I've seen many examples of data to related components, but do not know how to mix and match the binding with just a rich component controls base such as an input control. (This may better ask in a different thread).

    Finally, what of the big picture, the part about the addition of the datePicker - of ideas?

    Like cable TV, characters hosted - the kind that are related in my case the code! (Reference of American humor, must be familiar with USA cable TV channel (I'm addicted to the show House))

    Thank you, Ken

    Ken,

    A small correction to your last sentence - you don't want to refer to the support of the AM bean - you want to refer to the AM of the bean to support.

    If you want a very simple way: find the service for your AM method in the data control palette, drag-and - drop it on your page as a button JSPX. JDeveloper will automatically add a binding for the action in the pagedef. Then, double-click the button that results and create a new method of bean of support for her (in front of JDev, don't remember what we call the dialog box) - given the option, say JDev to put the code to link to you - then the resulting method should have the code that calls the method via the definition of the page. Simply add a bit of extra code to determine and set the date.

    John

  • Problem with radio buttons does not

    Hi, I just modified someone code a bit because instead of wanting a drop down menu, I wanted to use radio buttons.

    Unfortunately, the structure of the event does not appear as radio buttons, but I do not know why... Just, right now the VI runs and stays with the same "camera name" all the time. I will attach the VI in order to get an idea of what I'm talking about.

    This is because you have the event set up to capture the change in value for the camera name.  Try to create a Radio button value change event.

    Lynn

  • How to manage the current line with radio button selection?

    Hello world

    I have an ADF page with a table and a search"" button.
    I created a new attribute with VARCHAR2 (1) in the VO and dragged this attribute as the first column of the table. And changed this first column of the option button to select only a single line at a time.
    By clicking on the "Search" button, I need to get the current selected row values.

    How can I get the values of selected line?
    What code should I write to get the values of the selected line in the method of binding the button 'search '?

    All suggestions will be really useful.

    Thank you.

    Hello Kumar,
    I have a few comments on your case.
    >
    I created a new attribute with VARCHAR2 (1) in the t
    >
    1. you should create this attribute in the object of the entity, and then add it to the view object.
    2-do you need this radio that a button is defined for all lines? If yes then you need handle the case where the user set several lines and clear the value of the attribute for all other lines.

    >
    How can I get all the values of the current row in backing bean, binding of the Find method (method)?
    can u please give me the code for this?
    >
    If you mean by the current row is the row for which the value of the selected attribute is defined (the radio button is set to the rank), then you can write a method in the viewObjectImpl class and expose it to the customer interface and call it from your bean.
    Here is a sample Department table in the HR schema.

    //This method is written in DepartmentsViewImpl
    public Row getSelectedRadioRow(){
                //create a second row set to not impact the row set used in ADF
                RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
                //get the current row of the table to set it back after re-executing the VO
                DepartmentsViewRowImpl currentRow = (DepartmentsViewRowImpl)this.getCurrentRow();
                Row[] filteredRows = duplicateRowSet.getFilteredRows("IsSelected", "1");
                DepartmentsViewRowImpl row=null;
                if(filteredRows.length>0){
                    row = (DepartmentsViewRowImpl)filteredRows[0];
                    System.out.println("Department Name " + row.getDepartmentName());
                     }
                this.setCurrentRow(currentRow);
                duplicateRowSet.closeRowSet();
                return row;
            }
    
  • Option button setting the value of digital field display

    I have a Radio button with two elements, if the first button is selected, and then the numeric field should display as a monetary value ($x, xxx.xx) but if the second button is selected the numeric field should show as General numbers (x, xxx) with no decimal point.

    Any help would be greatly appreciated.

    Hello

    You can change the display model at run time, but it requires a bit of scripting.

    There is an example here: http://assure.ly/hVcqlj, if you have a look at the radio buttons on page 2. There is script in the click event that should help you.

    Hope that helps,

    Niall

    Ensure the dynamics

  • If the else with Radio button statement

    I try to make a PDF form for customers to order event services. I have a field I want to fill it with a number based on their choice of upgrade that is defined as radio buttons. If they choose option 1 or 2, the upgrade price is X. If they choose option 3 or 4, the upgrade price is Y. I want the text box to display X or Y depending on their choice. Or just 0 if they choose to not upgrade.

    JavaScript is quite far from my knowledge base, but I try to understand it anyway. Any help? What I have below (and everything else I've tried) does not work.

    If {(btn1.checked)

    162 = Event.Value;

    } Else if (btn2.checked) {}

    182 = Event.Value;

    } Else if (btn3.checked) {}

    162 = Event.Value;

    } Else if (btn4.checked) {}

    182 = Event.Value;

    }

    Then you can use something like this as a custom text field calculation script:

    Event.Value = "";

    var v = this.getField("menu").value;

    If (v == 'opt1': v == 'opt2') {}

    162 = Event.Value;

    } else if (v == 'opt3': v == 'opt4') {}

    182 = Event.Value;

    }

  • Validation as well as button set a value of adf faces

    Hi all

    I have an afform with user input fields. I want to provide a feature with 2 buttons depending on the role
    Role: user
    There are two buttons at the bottom of the 'Save' and submit form"
    When the user clicks on the button Save the record should be committed to the database with a 'SAVE' value inserted in the status column (there is an attribute of the State in the VO that is based on the form but not visible by the user)
    Similarly when the user clicks on the button "submit" to the folder should commit to the database with a "SENT" in the status column value.

    Role: Manager
    There are two buttons at the bottom of the form "Approve" and reject"
    When the Manager click the approve registration should be updated in the database with only the value of the status column changing of "SENT" to "APPROVED".
    The same for the rejection that the value of the status column should be updated to "SUBMIT" to "REJECTED".

    How can I do this?

    Thanks in advance.

    Hello Adam Pandya.

    Used four buttons to solve this use case. "" When the connection of the user show that two button which are 'Save' and submit "and when the role is Manager login show"Approve"and reject". Put condition on each rendering of button property that would be security.userInRole ['User'] for the user and securityContext.userInRole ['Manager'] for the Manager.

    Then create four method in backing bean and bind the method to each button. By clicking on the set button the corresponding value in the Status attribute in the VO.

    Thank you
    Prateek

  • Change ' display as ' type text box with radio button

    Hello

    I have a field on a form html clob. I have the default ' display as ' the value "Textarea with spell checker... I created a radio button with 2 values:

    Edit
    Overview HTML

    Is it possible to change the "display as" to "with the HTML Textarea editor' to switch between the radio button options? Any help would be appreciated I am running 3.1.2.00.02

    Thank you

    You could

    (1) call textarea_1 'Textarea with spell checker.
    (2) define as «Textarea with HTML editor» textarea_2
    (3) use javascript to show or hide one of them according to the radio button

    CITY

  • Best use of an option button n/d in collaboration with radio button groups.

    Hello

    I'm really new to LiveCycle ES, I would be too embarrassed to tell you how I came across this app.  I've attached a screenshot of a such question survey designed by our sales team.  Ideally, they want formulate me the answers to the question in such a way that the response of n/d, if selected by the user, does not allow other radio buttons on the same line selection.  Each group is a group of exclusion so that in each category is allowed that one answer, I built.  The problem is that the N/A option is its own group of radio buttons and cannot be deselected.

    Someone has advice on how to manage a radio button option N/A or may suggest a completely alternative way to handle this.  Its better if you look at the screen shot to see how hokey, it's really.

    Thank you

    Julie

    Julie,

    You copied my script, but did not change the names of path for the form variables. My root of form was 'form1 '. The root of your form is "SupplierSurvey".

    In addition, two variable shape rules of naming conventions: don't use dots (.) and don't use hyphens (-).

    I've renamed "on Page4-SurveyStart" to "Page4_SurveyStart" and removed the '. 1' extension of groups radio button exclusion to point 1.1. Accordingly, the code works for section 1.1 and you need to make the changes to the other sections.

    Steve

Maybe you are looking for

  • 'White box' on the screen

    Hi all! My Maxx bike is in version 5.0.2 and tonight I've updated my Gapps and now have a 'white box' on my house, on my wallpaper to be more exactly. How can I remove this 'box '? Please help me because it's very annoying and boring.

  • Battery stopped magic keyboard appear

    I got the magic keyboard because the first one came out a month ago or not and it was working fine until today when my iMac has informed me that the battery was low. So I plugged the connector of the lightning and noted that preferences-keyboard of t

  • track downloads to memory stick

    can I tract on xp professional which has been downloaded to a memory stick that day there

  • error message apple application support

    not able to access itunes like error message indicating apple application support missing; tried to download programs that were relevant to my windows XP, but failed; What should I do to get apple downloads?

  • CANNOT RUN THE PROGRAM - REALPLAYER

    WHEN I TRY TO RUN REALPLAYER I GET THIS MESSAGE: THE APPLICATION FILED AT THE BEGINNING BECAUSE MSVCP90. DLL WAS NOT FOUND.  REINSTALLING THE APPLICATION MAY FIX THE PROBLEM.  RE-INSTALL HAS NOT FIXED MY PROBLEM.  MY OPERATING SYSTEM IS WINDOWS XP.