How to set radio button from radio group using javascript, HTMLB

Hi guys,
I am trying to set one radio button as checked, from my radio button group using javascript.
This is the code:
     <hbj:radioButtonGroup id='TRAIN_SUB' columnCount="1">
          <hbj:radioButton id="TRAIN_SUB0" text="Not Applicable" key="NA" disabled="true" /> 
          <hbj:radioButton id="TRAIN_SUB1" text="SDF" key="SDF" disabled="true" jsObjectNeeded="TRUE"/>               
     <%     
          ssTrainSubsidy = new String(MAIN_FORM.getParamIdForComponent(TRAIN_SUB));
     %>
     </hbj:radioButtonGroup>
in javascript, i am using this:
               /document.getElementById('<%= ssTrainSubsidy%>')[2].checked =true;
I also tried to access the radiobutton directly, using
          ssTrainSubsidy0 = new String(MAIN_FORM.getParamIdForComponent(TRAIN_SUB0));
but it has null pointer error.
but always have error, anyone can help? thanks!!
Edited by: Feng Guo on Aug 12, 2010 3:44 PM

document.getElementById(radioid).checked =true;
this code will work to select the radio button (set). i think there is a error in the id you placed in ID. place the Radio butoon id and check again. Check this thread on [setting a Radio button|Setting HTMLB RadioButtonGroup Selection using JS;
regards,
Mahesh

Similar Messages

  • How to get page number from the PDF using Javascript

    Hi,
    We are having list of Single page PDF. The pdf are named in the order,
    ISBN_Author_01.PDF  (with real page number as i)
    ISBN_Author_02.PDF  (with real page number as ii)
    ISBN_Author_03.PDF  (with real page number as iii)
    ISBN_Author_04.PDF  (with real page number as 1)
    ISBN_Author_05.PDF  (with real page number as 2)
    ISBN_Author_06.PDF  (with real page number as 3)
    ISBN_Author_nn.PDF  (with real page number as 500)
    Here each pdf has a page number and in sequential order.
    The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
    To do this task, I am writing a Javascript to get the real page number from the PDF.
    Can anybody help me how to get the page number from the PDF using Javascript.
    Thanks,
    Gopal

    The "real" page number within a PDF is the count of the physical page starting at 0, zero.
    pageNum numPages
    The number printed on each page is the page label.
    setPageLabels  getPageLabel
    You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.

  • How can i read XML from local drive using Javascript into Live Cycle

    Hello,
    I am creating PDF Form using Acrobat LiveCycle.
    I want to write java script for load data into relative field and data present into xml file which is located at local drive
    I have write all method for parsing xml which is required ............... but i am stuck into how to read/open/load local drive xml using javascript?

    sandyrock:
    You'd better post this message to Adobe LiveCycle forum: http://www.adobeforums.com/webx/.3bbeda8d/
    You can use postMessage method in LiveCycle JavaScript to communicate with host application,the host application can be a web brower like IE.
    In IE you can use IE javascript to access local XML file.

  • How to set a param in href or using Javascript. (PLEASE HELP)!

    Hi,
    I have a servlet, that requieres 4 parameters: the jsp page, the bean, and one value from my list box.
    I having an issue in order to set the value from my listbox to my href. If I put the value in the variable it works very well, but if i try to read the value from my list box, always givme a null.
    Here is the Href sentence:
    <% String input = request.getParameter("dominiocustomer");%>
    <TD Height="20" width="100"><a href="/servlet/PInfranetServlet?page=change_login_form&Component=com.portal.web.comp.PServicesBeanImpl&loadBean=yes&dominiocustomer=<%=input%>">Cambiar
    Login</a></TD>
    Where the "dominiocustomer" is the name of my listbox.
    One important thing is that the list box object is under this piece of code, and I don't know it this is the reason, that I having a null value.
    I appreciate any help!

    If your list box (I assume we're talking about the <SELECT> element) is on the same page as your posted code it won't work unless you've made a preceding POST or GET request from the same page.
    The request.getParameter("parameterName") will retrieve that parameter from the preceding request and not from the same page (unless the above mentioned circumstances).
    If you want to use a value from within the same page I recommend Javascript:
    <TD Height="20" width="100">
    Cambiar
    Login</TD>
    where the function would look something like this:
    <script>
    function goLink(param1){
    var dc = document.yourFormName.theSelectListName.value;
    var linkURL = param1 + dc;
    window.location.href=linkURL;
    </script>
    /Rickard E

  • How to set Blog password from .mac group?

    I would like to publish my iWeb blog on my .mac group page. However, the username/password combination that is required for access to my blog via my .mac group is my main .mac username/password (which I don't want to share with anyone!). It should be the username/password combination that I created when I set up my .mac group (which is what it says it will be in the iWeb Site Inspector).
    Can anyone tell me how to fix this?
    TIA

    It is my understanding that if you want to access a page you have password protected, YOUR username/password will work AND the username/password that you set in Inspector. Did you try the other combination? I only know this because I tried accessing a password protected site that I made with my .mac username/password and it let me in. But it also let me in with the other combination. So you SHOULD be able to give the other username/password to friends to let them access the site.

  • Deleting a radio button from View for ESS

    Hi,
    I have imported ess~us and created a project on local machine.
    On the first screen of W2 reprint, I want to remove a radio button Intercompany mail. When I navigated to the Dictionaries> local dictionary> data type > simple type> delivery method type. Here on the enumeration tab for this data type. I am not able to edit it. The edit button is not highlighted. Cna any one let me know how to enable it.
    I am doing it right way? please guide me.
    ess 600 BP and NWDI 7.0
    Thanks,
    James

    Do you mean . I have to a Sync sources on project? If so, I tried it. and its still the same.
    Between, just to let you know.
    I am trying to remove a radio button from radio button group by key.
    or
    Does it have anything with the permissions? User here is JDI admin and Devloper.

  • How to deselect the Radio button from htmlb.table.TableView

    Hi Experts,
    Could you please help me, how to seselect the Radio button from htmlb.table.TableView?
    <hbj:tableView
                                       id="tbvCustomer"
                                       model="mcBean.csModel"
                                       design="ALTERNATING"
                                       headerVisible="TRUE"
                                       footerVisible="TRUE"
                                       navigationMode="BYPAGE"
                                       selectionMode="SINGLESELECT"                               
                                       fillUpEmptyRows="FALSE"
                                       headerText="Searchresults"
                                       visibleRowCount="10"
                                       onNavigate="CustomerSearchNavigate"
                                       visibleFirstRow="<%=mcBean.getCsVisibleFirstRow() %>">
    Problem: After searching and selecting the Customer in the table, then again we are searching for another customer. After that the searched customer is displaying in the Table. By default the table Radio button is selected. Because for first Customer we have selected the Radio button. How we can deselect the FRadio button while searching for another Customer.
    Thanks In Advance.
    Regards,
    Vijay.

    I think it is <2095>.
    In SmartForms, go to your text window. 
    Use the icon on the top left of the text window to switch to the old editor.
    INSERT -> CHARACTERS -> SAP ICONS. 
    Do a FIND on "radio".  It's called ICON_WD_RADIO_BUTTON_EMPTY.

  • How to create a radio button on OA Page using Personalization

    I am trying to create a radio button on OA Page using Personalization. The item style , I can see is Message Radio Group.
    How to create Message Radio Button and bring them under one group.
    Thanks

    You should use jdev to define a radiogroup and radio buttons under that, wrap that definition inside a stackLayout in jdev, use personalization to add a stackLayout and extend the region which you had created earlier in jdev.

  • Is it possible to flip the multiple choice quiz "radio" button from left to right of the answers?

    Hello forum,
    I am using Captivate version 6.1.0.319 on a Windows 7 desktop PC and would like to know if it is possible to flip the multiple choice quiz "radio" button from left to right of the answers. I am working on a project that uses the "Require Right to Left composer" within the Global Preferences: General settings. The captions has been switched from left to right but the quiz answer radio buttons did not. Any help would be appreciated.
    Thanks, in advance. 

    Hello and welcome to the forum,
    I'm not aware of such a possibility. A workaround could be to create your own MCQ slides, using standard objects and widgets like the radiobuttons widget (there is an enhanced version created by Jim Leichliter) and advanced actions. These articles were written for previous versions, but can give you an idea about the work involved:
    http://blog.lilybiri.com/widgets-and-custom-questions-part-1
    http://blog.lilybiri.com/extended-widgets-for-custom-mcq-and-tf-questi
    Lilybiri

  • How to add a button to the grouped data in an AdvancedDataGrid?

    Hi,
    Can anyone please suggest how to add a button to the grouped data in the AdvancedDataGrid?
    I have tried extending the AdvancedDataGridGroupItemRenderer and using it as the groupItemRenderer but its not reflecting.
    For the leaf node the itemRenderer property works just fine.
    Please help!

    HI ,
    I want to add a push button on the ALV list out put which is comming as a pop up and I want this using classes and methods.
    I have got a method IF_SREL_BROWSER_COMMANDS~ADD_BUTTONS from class cl_gos_attachment_list  but still I am unable to get any additional button on the output ALV popup.
    Please help.
    Regards,
    Kavya.

  • How do i delete myself from a group text?

    how do i delete myself from a group text?

    Sodaboy1978 wrote:
    Reply back and tell them to take you off.
    NOt that simply, the original sender would have to create a new group message omitting the OP from it.

  • How to set a language from LTR to RTL in illustrator cs4

    how to set a language from LTR to RTL in illustrator cs4.....plz help

    Mac or PC
    In either case the language has to be selected on the Mac go to the SystemPreference and language and text and select arabic as the language etc.
    That should do it.
    Oh, yes just in case you have to also select and arabic type face and it helps if you have a ME computer.

  • TS4006 how to set a tracking from the computer if someone stolen the ipod

    how to set a tracking from the computer if someone stolen the ipod

    Welcome to the Apple Community.
    You can only locate your device when it is logged into iCloud and 'Find My Phone' is enabled, additionally the device will need to be switched on and connected to a wifi or cellular network.
    Unfortunately, you cannot activate iCloud or 'Find My Phone' remotely.

  • How to set up printer from ipad?

    how to set up printer from ipad?
    Johs.

    iOS AirPrint Printers  http://support.apple.com/kb/HT4356
    How to Print from Your iPad: Summary of Printer and Printing Options
    http://ipadacademy.com/2012/03/how-to-print-from-your-ipad-summary-of-printer-an d-printing-options
    Print from iPad / iPhone without AirPrint
    http://ipadhelp.com/ipad-help/print-from-ipad-iphone-without-airprint/
    How to Enable AirPrint on a Mac and Use Any Printer
    http://ipadhelp.com/ipad-help/how-to-use-airprint-with-any-printer/
     Cheers, Tom

  • How to set iframe src from java dynammically

    Hi,
    Iam calling a servlet from jsp and servlet calls the databse query and returns the value,
    in my jsp i have ifrme, i want to change the source of iframe from java depends on the result from database , and the result must display on the iframe can any one tell me how to do this

    aurelian_cl wrote:
    I need to know how to set environment variables from java
    I want to set from java for example the environment variable "TestVar" with the value "TestValue"!1) That functionality does not belong in an application. You're trying to set environment variables, which are global across all applications, at either the user level as a whole, or across the entire machine (system level). Or, if you're only trying to set a variable active for the current process, you don't need to do that.
    2) Environment variables are not a platform-independent entity, and are thus against the nature of Java.
    My gut feel is that you are designing something in a backwards way, so my point is mainly to point that out, not to try to help you solve that particular problem.

Maybe you are looking for