How can i get the h:selectOneRadio value with javascript

Hi all.
I have this code
<h:selectOneRadio id="color" style="font-family: Arial;font-weight:lighter;font-size: 12px" onclick="showColor()" >
<f:selectItem itemLabel="RED" itemValue="1" />
<f:selectItem itemLabel="BLUE" itemValue="2" />
</h:selectOneRadio>
And javascript function is
function showColor()
var tipoRelacion = document.getElementById("form:color").value;
alert("color" + tipoRelacion);
And what i get is that color is undefined. How can i get the value of the selected radio?
Thanks a lot

you just need to pass this while calling javascript function
check this-
<h:selectOneRadio id="color" style="font-family: Arial;font-weight:lighter;font-size: 12px" onclick="showColor(this)" >
<f:selectItem itemLabel="RED" itemValue="1" />
<f:selectItem itemLabel="BLUE" itemValue="2" />
</h:selectOneRadio>
And javascript function is
function showColor(obj)
var val = obj.value
alert("color" +val);
}

Similar Messages

  • When I select a title in the iTunes Store and click on Play in iTunes I am sent to the download page for iTunes 10 which I have already. The selected title cannot be found anywhere in my iTunes. How can I get the title in iTunes with possibility to buy it

    When I select a title in the iTunes Store and click on Play in iTunes I am sent to the download page for iTunes 10 which I have already. The selected title cannot be found anywhere in my iTunes. How can I get the title in iTunes with possibility to buy it?

    The issue is that your credit or debit card credentials must be associated with the same country where you reside in order to purchase iTunes content.
    "Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store, rather than your actual geographic location. You can use the iTunes Store in all countries of which you’re a resident, but you’ll either need a separate iTunes Store account for each one, or you’ll need to continually be switching the billing information on your single account. Generally, it’s simpler just to set up an alternative account for these situations, although it’s worth nothing that features like iTunes in the CLoud and iTunes Match are designed to work best when using a single iTunes Store account, as you can only switch accounts with these services every 90 days."
    From here >  The Complete Guide to Using the iTunes Store | iLounge Article

  • How can I get the digital booklet included with the albums I am purchasing from iTunes directly on my iPad?

    How can I get the digital booklet included with the albums I am purchasing from iTunes directly on my iPad?  My MacBook died about 6 months ago, so now I just have an iPhone and iPad.  I would like to be able to see the Digital Booklet in my iPad when I download the album.  I do not have any other computer to download the booklet to and sync to my iPad.

    Apparently, you have to download the booklet to iTunes on a computer first, fiddle with the file type, then sync it as a book to your iPad. See http://support.apple.com/kb/HT4194 for details.

  • How can I get the time in Microsecond with JNI ?

    How can I get the time in Microsecond with JNI ?

    JNIEXPORT jdouble JNICALL Java_Win32Native_queryPerformanceFrequency (JNIEnv *env, jobject obj) {
         LARGE_INTEGER lFrequency;
         ::QueryPerformanceFrequency(&lFrequency);
         return (jdouble)lFrequency.QuadPart;
    JNIEXPORT jdouble JNICALL Java_Win32Native_queryPerformanceCounter (JNIEnv *env, jobject obj) {
         LARGE_INTEGER lpCounter;
         ::QueryPerformanceCounter(&lpCounter);
         return (jdouble)lpCounter.QuadPart;

  • HT4623 iPad 3 how can l gets the SIM card works With iPad 3

    As all we know its christmas time l just received the gift for iPad 3 &amp; l notice that it need SIM card for me to use as the phone &amp; data,how can l gets the SIM card works With iPad 3

    Remember am in South Africa &amp; we got few carrier nets am in MTN provide &amp; I c my sim looks so big to fit on my iPad

  • Pro: in RF Development  how can i get the scaned barcode value to Tcode

    Hi,
        I need to develop a custom RF settings for Scaner. I have gone through the SAP Provided documentation. SAP Has given in report we need to call Screen.
    Every thing is clear for me... creating report, screen, triggering messages, customization.. etc. <b>My question</b> is what are naming conventions i need to use. it's custom Transaction. When ever we scan the Barcode, how that value is passing to initial screen of my Program. how can i keep it in SAP Memory. once after getting the value it's anormal transaction. i can code for that. how can i get the scaned value.

    Hi!
    Most (of my) customers use their scanners in keyboard simulation mode. Than it's like typing the number (or character) of the barcode. -> You need an input (char) field. Most (all?) scanners can be programmed to add a constant at the end -> use 'enter' and you get your PAI triggered.
    Then scanning is same as typing 11 (or 13 or whatever) numbers on keyboard.
    Other option would be, using scanner in native mode. But then you need a kind of device driver, which calls SAP via RFC. Possible, but more complex (because of missing alternative 'keyboard' in case of trouble).
    What happens, if scanner can't read barcode, but user can identify numbers below -> you need anyway char-input field  reacting on keyboard, too.
    Regards,
    Christian

  • How can i get the content of JTextArea with out loosing Indentation.

    I am developing one mail sending application. I am getting mailid , from address, mail body from one Swing. In one JTextArea i am typing i have typed some matter. When i call the content of JTextArea using
    jtx.getText() method, i am getting all the content as one paragraph. That means there is no indentation which was there in TextArea.
    Please provide me some solution how can i get the content of JTextArea wiht out loosing indentation.

    And it was you who asked the question!

  • Newbie: How can I get the camera to work with skype on macbook air

    Sorry that I'm a beginner at this.  I just can't find the answer to it, but I'm sure it's common question.  Since the macbook air has a camera built in, how come it isn't showing up on my new skype account?

    Go into an Apple Store if under a year old from purchase. They can assist you
    Or check out the issue at the Apple Support Community
    http://www.apple.com
    Good Luck

  • How can i get the item of combobox in javascript LCD?

    Hi!
    I have a question about javascript in LCD i want to get or assign the item value of a combobox because i need to mapping and i´ve tried using the option
    form1.Page.Contenedor.RadioBtn.rbTipo[1].caption = "nuevotexto";
    form1.Page.Contenedor.RadioBtn.rbTipo[1].rawValue = "nuevotexto";
    and more... but i don´t know if that is possible, could someone help me?
    thank's

    Hi,
    I think you are trying to set the value of a radio button group(???).
    If so, then you first need to look in  the Object > Binding palette to set the bound values.
    Then you can set the value of the radio buttons by referencing the exclusion group and not an individual radio button.
    If you have three radio buttons in an exclusion group 'RadioBtn' and they had bound values of '1', '2' and '3'. Then the following script would select the second button in the group:
    form1.Page.Contenedor.RadioBtn.rawValue = "2";
    If I have picked up your query wrong, then come back with some more info.
    Niall

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How can we get the values from the view?

    Hi All,
    my scenario is i have two fields in my view .one is parameter.and another on is select-options.how can i get the user entered values into my selection screen.?
    for the select options i get the values into field-symbol.for parameter i get the value using get_attribute.
    can i use like this in select statement.
    WHERE SERVICE_ID  = ZSD_DD_AUFNRS
                       AND CRE_DT IN <FS_DATE>.
    Regards,
    Ravi.

    Hi Sravan,
    when i am using the below code to generate self defined functions i m getting a error .
    *Generate an object for self defined functions
      DATA: lo_self_functions TYPE REF TO if_salv_wd_function_settings,
    *Generate an object for button 'Confirm'
           lr_button TYPE REF TO cl_salv_wd_fe_button,
           lo_self_function TYPE REF TO cl_salv_wd_function,
                  l_text type string.
    *Set Self-defined functions
    *'Confirm' Button
      lo_self_functions ?= l_value..
      lo_self_function = lo_self_functions->create_function( 'CONFIRM'  ).
      CREATE OBJECT lr_button.
      CLEAR l_text.
      l_text = 'Confirm'.
      lr_button->set_text( l_text ).
      lr_button->set_image_source( '' ).
      lr_button->set_image_first( 'X' ).
      lo_self_function->set_editor( lr_button ).
    Error when processing your request
    What has happened?
    The URL http://cgslsvr3.cgsl.com:8020/sap/bc/webdynpro/sap/zsdr_cash_work_list/ was not called due to an error.
    Note
    The following error text was processed in the system CGD : WebDynpro Exception: IDs Can Only Contain Characters of Syntactical Character Set
    The error occurred on the application server cgslsvr3_CGD_20 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE of program CX_WD_GENERAL=================CP
    Method: CONSTRUCTOR of program CL_WDR_VIEW_ELEMENT===========CP
    Method: CONSTRUCTOR of program CL_WD_TOOLBAR_BUTTON==========CP
    Method: NEW_TOOLBAR_BUTTON of program CL_WD_TOOLBAR_BUTTON==========CP
    Method: IF_SALV_WD_COMP_TABLE_UI~CREATE_TOOLBAR_ITEM of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~CREATE_TOOLBAR_ITEMS of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE_TOOLBAR_ITEMS of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE_TOOLBAR of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system CGD in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server cgslsvr3_CGD_20 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server cgslsvr3_CGD_20 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 110 -u: CT-0024 -l: E -s: CGD -i: cgslsvr3_CGD_20 -w: 0 -d: 20080414 -t: 105835 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    How can i resolve it?
    Regards,
    Ravi

  • How can I get the edited value from the editor in JTable

    I have a JTextField added as an editor to a cell in JTable.
    I value gets changed when I press enter.
    but in actionPerformed of the JTextField when I say
    String txtEditorValue = txtEditor.getText();
    I am getting the old value. How can I get the edited value? Thanks.

    Hi,
    I guess, your understanding of how JTable works together with its models is not good enough - for example the method getTableCellEditorComponent(...) of the TableCellEditor interface is used to get the component, that should be used as editing component - its second parameter is a value that should be used to setup the editing component - it is normally not the editing component itself.
    JTable uses an underlying TableModel to store the cell values - if you have edited a cell, JTable gets the value of the editing component by itself and stores it in the TableModel using its setValueAt(...) method. To retrieve this data you only need to query the TableModel using row and column of this cell as parameters
    say jt is your JTable, and row and column are the row and column of the cell - so to get the value, simply use
    Object obj = jt.getModel().getValueAt(row,column);
    if you know, that there is a String in this cell use
    String str = (String) jt.getModel().getValueAt(row,column);
    The editor component is used for the view of the JTable - you only want the data, which is stored in the model - you don't have to deal with the GUI components in this case.
    greetings Marsian

  • How can I get the value of "Warehose" column in a form

    How can I get the value of "Warehouse" column in the form below (I mean what table that contain this value):
    Production Supervisor >> Batches >> (Button) Material Details >> (Button) Line Allocations
    Well, for more clearly! My problem is I must have the Unit Cost of Items, so I've got it in the cm_cmpt_dtl (table), but if I want to, I must create a relation that require 2 filed, they're Item_ID and Whse_Code.
    There's no problem with Item_ID, but Whse_Code seem to be the Mission Impossible (hix, I hate that film!!!!)
    I wonder if It was right to post this topic here. But anyway I just post my question here, hope I could get some help.

    wow, many, many, many.... and many thanks!
    Just add a tiny modify to check out the Batch_type
    doc_id = (select batch_id from gme_batch_header where batch_no='&batch_number' and batch_type = 0)
    Because the batch_no can be duplicated as we also create Batch and Filrm Planned Order.
    Many thanks for your support!
    P/S: Sorry for my terrible English :P

  • How can I get the default value of a particular preference programatically. I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    How can I get the default value of a particular preference in FireFox?.
    I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
    I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
    Any help towards acheiving this programtically is greatly appreciated.
    If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Dear Friend,
    Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
    Then you can get the value from the outparameter using callablestatement.getXXX().
    Try that way.
    For free tral versions of JDBC Drivers go to www.Atinav.com

  • How can we get the value of the key field in a custom data model using governance API?

    Dear Team,
    How can we get the value of the key field in a custom data model, to be used for manipulation of the change request fields using governance API?
    Any kind of help would be sincerely appreciated.
    Thanks & Regards,
    Tushar.

    Hi Michael,
    Thanks for direction. Let me give more context on this as I'm interested to get more details..One of the issue was to read cross entity field values on UI based on user action and set other entity field behaviour...It is similar to what is being posted here.
    For ex: Reading MTART from Basic Data UIBB in MM MDG UI and set the field properties in some other custom entities say ZZETEST. This cannot be done using UI BADI as it only supports single entity at a time and not cross entity. So alternatively we found a solution where we can enhance existing PLMB feederclass cl_mdg_bs_mat_feeder_form by reading the model and the entity as needed as it it proved that it supports cross entity UI field behaviours and so business requirements.
    This is a workaround for now.
    So the question is How do we achive it using governance API for cross entity field behiaviours.?or what is the right way doing this.
    Can we do that using governance API and its' methods?
    In the Governance API doc you provided below has referring to below external model as part of gevernance API.
    The active or inactive data (before or during the derivation or the check) can be read
    with the external data model interface IF_USMD_MODEL_EXT with the method READ_CHAR_VALUE and
    the corresponding READ_MODE parameter. To avoid unnecessary flushes (derivations), the NO_FLUSH
    parameter should b
    e set to ‘X’.
    Thanks
    Praveen

Maybe you are looking for

  • Can not access server's on public ip's

    Guys, We have a core switch with two fibre lines connecting us through two different ISP's to the internet. These ISP's have provided us with a range of public ip's each. We have a few routers on some of these ip's and they are working fine and we ca

  • Printing logo at a specified position in main window in sap script

    Hi, I need to print a logo just after the signature which is coming in the main window, So basically i need to call a var(secondary) window inside the main window just after the signature and the position of logo should be towards the right. I tried

  • Sequences in 10g R2 RAC

    We are planning to implement 10gR2 RAC in the next few months. We have 2 sites and we will be having 2 node cluster at each site and we will be using streams to replicate data across these two sites. This is 2 way/multiway streams replication. My dev

  • IChat can't connect to Google Talk

    I can't get iChat to connect to Google Talk. I'm using iChat 5.0.3 (Snow Leopard, 10.6.8). I have a google account, but it is not a gmail account. My jabber id is my e-mail address (because that's what my google account is). The server is set to "tal

  • Configuring GTC DB connector

    Hi, I have created a DB connector in OIM. As expected, the process form and the resource object are created automatically. Now, i am trying to create a newer version of the form by changing the field labels. While making the version active, I receive