Setting a value of option button using Javascript

After much research, I realized that the appropriate command to get the value of a radio button in JavaScript of the APEX is 'html_RadioValue', but I was not able to understand a command that will allow you to that you set the value of the option button. Is there a documentation on the use of the APEX of the JavaScript which covers this issue?

Here is a simplified version of the script:


< script language = "JavaScript" type = "text/javascript" >
function showval()
{
var item1 = html_RadioValue ('P19_RADIO');
Alert (Item1);

Invert the current selection
If (item1 == 'Y') then
{
< mystery_statement > //set P19_RADIO n.
}
on the other
{
< mystery_statement > P19_RADIO //set to Y.
}
}
< /script >


I tried the following, but none of them have worked:

-document.getElementById ("P19_RADIO") .value = 'n';
-document.getElementById ("P19_RADIO") .checked = 'n';
-$x('P19_RADIO').value = 'n';
-$x('P19_RADIO').checked = 'n';


Thank you.

Chris:

- document.getElementById("P19_RADIO_0").checked = true; // should work. '0' is the index of the first item in the radio group

3.1.2 APEX Javascript APIs are documented here

http://download.Oracle.com/docs/CD/E10513_01/doc/apirefs.310/e12855/javascript_api.htm#CDEEIGFH

CITY

Tags: Database

Similar Questions

  • disable a button using javascript

    Hi guys,.

    How to disable a button using javascript code?

    I used below the code, but its does not work any idea with this...
    document.getElementById('DELETE_BT').disabled = true; 
    My button key attributes is id = "DELETE_BT" .


    Thank you in advance

    Hello

    Try this:
    Use it in your JavaScript code.

    $('button[type="button"][value="Cancel"]').attr('disabled', 'disabled');
    

    It's a jQuery code I've tried on a button of the model with label/Alt text like "Cancel".
    which is used in above code * [value = "Cancel"] *.
    The normal deactivation mechanism with above methods do not work on the model function button
    as it is not built usinginternally in the ApEx, but using
    and that's why they don't have any idattribute.

    I hope this helps!
    Kind regards
    Kiran

  • Access to the value of the application using javascript

    How can we access the value of the APPLICATION using javascript? I tried $x ('REQUEST'), but it does not work.

    Thank you

    Hello

    If you use & ASK. (including the & and the.) in your javascript directly it will be replaced by Apex with the value of the actual demand

    Andy

  • Adobe Reader Submit button using JavaScript

    We have a form once submitted to use javascript to update the subject line of the e-mail message to our workflow process. This process works absolutely fine when using Acrobat. However, when sent to someone using Reader (even with JavaScript enabled in preferences) nothing happens when the button is clicked. The form has been designed in Acrobat Professional 10.

    Here's the JavaScript code we use...

    var wsuid = this.getField ("mywsuid");

    var d = new Date();

    var month = d.getMonth () + 1;

    var day = d.getDate ();

    year = var d.getFullYear ();

    var today = ((''+month).length < 2?) ('0': ") + month + ' / ' + ((''+day).length < 2?) ('0': ") + ' / ' + day + year;

    var name = this.getField ("name");

    var object = "object:" + (wsuid.valueAsString) + ":" + (name.valueAsString) + ': ' + (today); "."

    this.mailDoc({)
    bUI: true,
    cTo: "[email protected]."
    cCc:
    bassujetti: object,
    });

    Suggestions on comes to work with Acrobat Reader is much appreciated.

    Bleuel dawn

    Wichita State University

    Okay, Yes... What happened, is that you choose an unfortunate name for your variable. You see, there is already a property of the subject called Document object, and it cannot be written to the drive. Even if you have defined your own variable with the same name, the script is to find that one first, where the error. Rename your variable to something else (like subjectLine) and it should work fine.

  • How to get the value of the option button in JavaScript

    I have a very simple radio with two values: 1 and 2. I'm moving the value by using a JavaScript call to a pop-up window. I guess there is another method of getting the value, as
    var v_typ = document.getElementById("P1520_TYPE").value;
    does not work.

    Hello

    If you are on Apex 3.x or later, use the JavaScript $v API functions
    http://download.Oracle.com/docs/CD/E14373_01/apirefs.32/e13369/javascript_api.htm#CHDEJEIG

    var v_typ = $v("P1520_TYPE");
    

    Kind regards
    Jari

  • hide a button using javascript

    I have a button whose action when the user clicks a value of redirection and URL in the target that I wrote
      javascript: $('#dept').hide();   // it works fine and hides a region
       javascript: $('#saveTA').hide();  //does not hide the button
    
      NOTE: the button saveTA and the one i m clicking to hide it are in different regions. can tat be a matter?
    
      
    where saveTA is the static id of the button I want to hide. using this technique, I can hide from the regions concerned but even function and the technique does not work to hide a button.

    help is strongly requested.

    Hello

    Make sure that the 'button model' has the ' #BUTTON_ATTRIBUTES # ' included tag.

    CITY

  • Activate the commnad ADF button using javaScript

    I am trying to turn a commnad button when clicking on a component Boolean Checkbox select. A JavaScript function is called when the user clicks the check box. In the method, I try to get a referecne to the command button (to be enabled). But the reference returns always null/undefined.

    Code in javascript:

    function enableDisableViewDetails (event) {}
    var chkBox = event.getSource ();
    var checkBoxValue = chkBox.getValue ();

    var viewDetailsBtn = AdfPage.PAGE.findComponentByAbsoluteId ('pglhead:pg12:pg13:pg15:viewDetails');
    var viewDetailsBtn = AdfPage.PAGE.findComponent ("pglhead:pg12:pg13:pg15:viewDetails");
    var viewDetailsBtn = event.getSource (.findComponent('pglhead:pg12:pg13:pg15:viewDetails'));
    Alert (viewDetailsBtn);

    If (checkBoxValue.toString () == 'true') {}
    viewDetailsBtn.disabled = true;
    }
    }

    The code in the JSFF page:

    < af:selectBooleanCheckbox
    ID = "rowSelection' clientComponent = 'true '.
    value = "#{row." Selected} ">"
    < af:clientListener method = "enableDisableViewDetails" type = "click on" / >
    < / af:selectBooleanCheckbox >

    Can someone help me please how to refer to the command button (the button is in some other configuration group Panel in the same fragment)?

    JDev Version: 11.1.1.1.3.0

    Any reason that you try this without the use of PPR?

    CM.

  • Fill in the text field of the value of select list using javascript

    Hello

    I'm editing a form where a text field is to be filled using an On-Demand application process. The process is called with an OnChange.

    Application process:
    declare
      l_CCSS_STATUS varchar2(100);
    begin
      select CCSS_STATUS into l_CCSS_STATUS from PATIENT
        where ID = :P11_PATIENT_ID;
      htp.prn(l_CCSS_STATUS);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    l_CCSS_STATUS := 'Inactive';
      htp.prn(l_CCSS_STATUS);
    end;
    In the attributes of HTML Form selection list element:

    onChange = "javascript:f_getStatus()"; "

    It fills a text field (: P11_CCSS_STATUS) when I appreciate is selected in the select list.


    I am filling a second field (: P11_COPY) with a (share) value for the same table of PATIENTS, but don't really understand how the: P11_CCSS_STATUS field is filled in from the application process.

    If I understand the request of the share in the application process, then it is appended to the value CCSS_STATUS and appears in the: P11_CCSS_STATUS text element.

    Any help is appreciated.

    Thank you
    Matt

    Hello

    visit the similar to the below application process

    declare
      l_CCSS_STATUS varchar2(100);
      l_COPAY varchar2(100)
    begin
    
      select CCSS_STATUS , COPAY into l_CCSS_STATUS , l_COPAY from PATIENT
        where ID = :P11_PATIENT_ID;
      //notice this line.... how the response is send
      htp.prn(l_CCSS_STATUS || ',' || l_COPAY);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    l_CCSS_STATUS := 'Inactive';
      htp.prn(l_CCSS_STATUS);
    end;
    

    and javascript call you to something similar to below.

    function myAjaxCall()
    {
       var ajaxRequest = new htmldb_Get( null , &APP_ID. , 'APPLICATION_PROCESS=myAppProcess',0);
       ajaxRequest.add('P11_PATIENT_ID' , $v('P11_PATIENT_ID'))
       //notice the below line.. use of split function
        ajaxResult = ajaxRequest.get().split(',')
       $s( 'P11_CCSS_STATUS' , ajaxResult[0]);
          $s( 'P11_COPAY' , ajaxResult[1]);
    }
    

    Example: http://apex.oracle.com/pls/apex/f?p=12060:110

    Kind regards
    Shijesh

  • Set the value of a variable using a conditional, on a sliding scale?

    Basically what I'm doing, is assign the variable "supplement" a number of base on the Variable 'numberOfSheets '. The only problem is that I need to assign a different variable for each leaf up to 6,000. All about 6000 will have the same variable.

    Someone has any idea how to write something like this, without having to show the sources individually each sheet?

    Here's an example of my code...

    function calculateUpCharge (): void {}

    {if (numberOfSheets = 1)}

    upCharge = number (20);

    }

    ElseIf (numberOfSheets = 2) {}

    upCharge = number (19.5);

    }

    ElseIf (numberOfSheets = 3) {}

    upCharge = number (19);

    }

    ElseIf (numberOfSheets = 4) {}

    upCharge = number (18.5);

    }

    ElseIf (numberOfSheets = 5) {}

    upCharge = number (18);

    }}

    What is a linear function?  If so, use:

    var m:Number;

    var b:Number;

    paramF (6000,2,1,20);

    function calculateUpCharge (): void {}

    upCharge = m * numberOfSheets + b

    upCharge = Math.max (upCharge, m * 6000 + b;)

    }

    function paramF(x1:Number,y1:Number,x2:Number,y2:Number):void {}

    m =(Y1-Y2) /(x1-x2);

    b = y1 - m * x 1;

    }

  • Setting a value of a field using pl/sql dynamic.

    Hello.

    I have a little thing I'd like to be able to do, but I'm having a problem with. I wish I could change the value of a dynamic field in forms. That's what I would do.

    procedure change_value (field_name in varchar2) is

    Start

    form_ddl (': ' | Field_Name |': = null "");
    -After this, I do more things regarding this area.

    end;

    I know that form_ddl does not work with bind variable, so this method certainly does not. But is there another way to make this form of inside?

    I hope you understand what I mean.

    Kind regards
    Regine K. Gudmundsson

    As says: copy builtin is right for you...

    ...
    copy(null, vInputField);
    ...
    
  • How to set the value of QUERY using PL/SQL process?

    Hello

    I use APEX 4.2...
    How to set the value of the REQUEST using process of PL/SQL which lies before the header - where the value of the REQUEST should appear on the URL?

    Kind regards
    Fateh

    You cannot set a value of demand in a PL/SQL block. You can run a PL/SQL block on a request which is the id of a button for example.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • setting programmatically toggle the value of the button?

    Isn't this possible? I looked at help for the SetCtrlVal() and the SetCtrlAttribute(), and it doesn't look like it can be done. True?

    My app has a command button to clear the displayed graph. It would be nice that the first steps of the function to set the value of a button switches to "OFF". Any other way to solve this problem?

    Thank you.

    SetCtrlAttribute (, ATTR_CTRL_VAL, 0);

    or

    SetCtrlVal (, 0);

    works for me.

  • Is it possible to adjust the alpha of a button in Captivate 9 using JavaScript?

    I was wondering if anyone knows if it is possible to adjust the alpha of a button in Captivate 9. I was able to activate and deactivate the buttons using JavaScript, but were not able to change the alpha of a button.

    John

    var thisElement = document.getElementById ("your_btn" + "c")

    thisElement.style.opacity =. 5;

  • Select a radio button via javascript

    Is it possible to select an option button using a script?

    I'm trying to select a radio button with the 0 value in a group called Department if a radio button with a value of 0 is selected in a group called TimeofCall.

    I tried this and several variants:

    If

    ((this. TimeofCall.rawValue == 0))

    {

    xfa.host.messageBox ("day is selected.");

    This. Department.rawValue

    == 0;

    }

    I get the message, so I know he checks the TimeofCall group but I can't seem to select an option button in the Group of Department.

    Any ideas would be appreciated.

    -Kevin

    You are the syntax is a little messed up.

    'This' is used to refer to the current object.

    Thus, assuming that the value you are testing is the current focus of basic education should be along the lines of:

    If (this.rawValue == 0) {}

    RadioButtonList.fieldname.rawValue = 0;

    }

    else {}

    //}

    If you test another area, it would be:

    If (fieldname.rawValue == 0) {}

    RadioButtonList.fieldname.rawValue = 0;

    }

    else {}

    //}

    Hope that helps! Going from memory for the moment...

  • Dynamically set a value based on the selected value of LOV

    Apex 4.2

    I can't create a dynamic action to set a value. I have used dynamic actions to hide and display areas but for some reason any cannot set a value.

    I have a list of selection-> P101_LIST. Type of source is "Column of the database". Source of value or an expression is "person_id" the query is as follows:

    Select first_name, person_id
    From Persons
    

    I have a display-> P101_DISPLAY value. Source type is 'static Assignment. The source value or expression that I left blank.

    I would like for each time the user selects a name of P101_LIST, the P101_DISPLAY element is updated to display the value (person_id) correspondent.

    Because there are other page elements / information on the page, I prefer that to not submit / update of the page. Would not want other page elements / information update.

    Any help on this would be greatly appreciated. Thanks in advance.

    Hello

    Create a DA:

    -event onChange P101_LIST

    -Action: PL/SQL

    -PL/SQL code:

    : P101_DISPLAY: =: P101_LIST;

    What to submit: P101_LIST

    Point of return: P101_DISPLAY

    And in fact.

    Kind regards

    Joni

Maybe you are looking for

  • 12.4.2.4 iTunes messes up Album and artists views

    Since I installed version12.4.2.4, iTunes seems to mess up the metadata of my music files and/or albums not correctly appear in the views of artist and Album. In the last 24 hours I have torn/imported 2 albums. The first album I tore guard split into

  • Satellite A105 - connectivity Wi - Fi issues

    Hello, I hope someone here can give me some advice. It seems that my laptop is unable to connect to Internet wireless after that I tried to quarantine and remove a pack of malware which itself recently installed. Everything worked perfectly until aft

  • Satellite S35DVD PS30DE: Most recent need driver graphic

    I have a * Toshiba S35DVD * from around the year 2000. I want to download the new drivers, especially for video.I have looked through the technical support information on Toshiba.com, but could not find this model. It is probably a model which is pla

  • Satellite A10: Battery-LED flashes with AC

    Not too long ago I bought a new battery for my laptop. About a year and a half he worked well. But one day I just couldn't start Notepad without AC. I thought, just dead battery. If I set up the adapter sector, but the next time, the laptop didn't st

  • change my e-mail address of rescue

    The email address that I have now as my emergency address is no longer valid. How can I change because there is no tab Remove next to him and when I click it, I get the message 'e-mail has been sent to this address' has no help for me.