ClientSide Javascript on RadioButton Selection

Hello together,
I've seen some examples of how to perform a clientside javascript function from an htmlb element(inputfield).
I want to add this functionality to a radiobutton-group but can not realize it.
This is where I am:
<hbj:radioButtonGroup
id="radioGroup"
columnCount="1"
selection="BOL"
>
<hbj:radioButton
id="BOLProducts"
text="BOL Products"
key="BOL"                      
tooltip="Search BOL products"
jsObjectNeeded="TRUE"
>
<%
     BOLProducts.setClientEvent(EventTrigger.ON_CLICK,"searchBOL()");
%>
</hbj:radioButton>
<hbj:radioButton
id="MOLProducts"
text="MOL Products"
key="MOL"
tooltip="Search MOL products"
jsObjectNeeded="TRUE"
>
</hbj:radioButton>
</hbj:radioButtonGroup>
But when I try this, I get a NullPointerException!
Any help would be great.
Thanks,
Andy

HI,
Code
=====
<%@ taglib uri="tagLib" prefix="hbj" %>
<%@ page import = "com.sapportals.htmlb.enum.EventTrigger" %>
<%@ page import = "com.sapportals.htmlb.event.Event;"%>
<hbj:content id="myContext" >
  <hbj:page title="PageTitle">
  <script>
function process(){
alert('hi');
</script> 
<hbj:form id="myFormId" >
<hbj:radioButtonGroup
id="radioGroup"
columnCount="1"
selection="BOL"
>
<hbj:radioButton
id="BOLProducts"
text="BOL Products"
key="BOL"
tooltip="Search BOL products"
jsObjectNeeded="TRUE">
<% radioGroup.getRadioButtonForKey("BOL").setClientEvent(EventTrigger.ON_CLICK, "process()"); %>
</hbj:radioButton>
<hbj:radioButton
id="MOLProducts"
text="MOL Products"
key="MOL"
tooltip="Search MOL products"
jsObjectNeeded="TRUE"
>
</hbj:radioButton>
</hbj:radioButtonGroup>
   </hbj:form>
  </hbj:page>
</hbj:content>
To get the radio button object inside JS use:
    function calculateCurrencyFromTo(){
         var funcName = htmlb_formid+"_getHtmlbElementId";
         func = window[funcName];
         var rb = eval(func(htmlb_radiobuttonmodifier+"radiobutton"));
Also Refer javascript API in the following LINK
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/0c/9e0e41a346ef6fe10000000a1550b0/frameset.htm">JavaScript API</a>
========================================================
Try the code i have posted now
The code is working fine for me, i don't know why the text is invisible for you?
Label for both radio buttons invisible?
Message was edited by: Kirupanand Venkatapathi
======================================================
Can you post the full code of your JSP
Message was edited by: Kirupanand Venkatapathi
========================================================
I removed the bean accessing code snippets, try executing the following code and see whether you get the UI display correctly.
<%@ taglib uri="tagLib" prefix="hbj" %>
<%@ page import = "com.sapportals.htmlb.enum.EventTrigger" %>
<%@ page import = "com.sapportals.htmlb.event.Event;"%>
<hbj:content id="myContext" >
<hbj:page title="PageTitle">
<hbj:form id="myFormId" >
<script language="JavaScript">
function searchBOL() {
alert('hi');
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var inputfield1 = eval(func("txtEquipmentNumberFrom"));
if (inputfield1.isEnabled) {
inputfield1.setDisabled();
inputfield1.setValue("");
var inputfield2 = eval(func("txtEquipmentNumberTo"));
if (inputfield2.isEnabled) {
inputfield2.setDisabled();
inputfield2.setValue("");
var inputfield3 = eval(func("txtEquipmentDescription"));
if (inputfield3.isEnabled) {
inputfield3.setDisabled();
inputfield3.setValue("");
var inputfield4 = eval(func("txtSerialNumberFrom"));
if (inputfield4.isEnabled) {
inputfield4.setDisabled();
inputfield4.setValue("");
var inputfield5 = eval(func("txtSerialNumberTo"));
if (inputfield5.isEnabled) {
inputfield5.setDisabled();
inputfield5.setValue("");
function searchMOL() {
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var inputfield1 = eval(func("txtEquipmentNumberFrom"));
if (!inputfield1.isEnabled) inputfield1.setEnabled();
var inputfield2 = eval(func("txtEquipmentNumberTo"));
if (!inputfield2.isEnabled) inputfield2.setEnabled();
var inputfield3 = eval(func("txtEquipmentDescription"));
if (!inputfield3.isEnabled) inputfield3.setEnabled();
var inputfield4 = eval(func("txtSerialNumberFrom"));
if (!inputfield4.isEnabled) inputfield4.setEnabled();
var inputfield5 = eval(func("txtSerialNumberTo"));
if (!inputfield5.isEnabled) inputfield5.setEnabled();
</script>
<hbj:gridLayout
id="grid1"
cellSpacing="5">
<hbj:gridLayoutCell
rowIndex="1"
columnIndex="1"
>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="1"
columnIndex="2"
>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="1"
columnIndex="3"
>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="1"
columnIndex="4"
>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="2"
columnIndex="1"
>
<hbj:label
id="lblMaterialNumberFrom"
text="Material Number from:"
labelFor="txtMaterialNumberFrom"
>
</hbj:label>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="2"
columnIndex="2"
>
<hbj:inputField
id="txtMaterialNumberFrom"
type="string"
maxlength="100"
jsObjectNeeded="TRUE"
>
</hbj:inputField>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="2"
columnIndex="3"
>
<hbj:label
id="lblMaterialNumberTo"
text="Material Number to:"
labelFor="txtMaterialNumberTo"
>
</hbj:label>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="2"
columnIndex="4"
>
<hbj:inputField
id="txtMaterialNumberTo"
type="string"
maxlength="100"
jsObjectNeeded="TRUE"
>
</hbj:inputField>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="3"
columnIndex="1"
>
<hbj:label
id="lblMaterialDescription"
text="Material Description:"
labelFor="txtMaterialDescription"
>
</hbj:label>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="3"
columnIndex="2"
>
<hbj:inputField
id="txtMaterialDescription"
type="string"
maxlength="100"
jsObjectNeeded="TRUE"
>
</hbj:inputField>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="3"
columnIndex="3"
>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="3"
columnIndex="4"
>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="4"
columnIndex="1"
>
<hbj:label
id="lblEquipmentNumberFrom"
text="Equipment Number from:"
labelFor="txtEquipmentNumberFrom"
>
</hbj:label>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="4"
columnIndex="2"
>
<hbj:inputField
id="txtEquipmentNumberFrom"
type="string"
maxlength="100"
disabled="TRUE"
jsObjectNeeded="TRUE"
>
</hbj:inputField>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="4"
columnIndex="3"
>
<hbj:label
id="lblEquipmentNumberTo"
text="Equipment Number to:"
labelFor="txtEquipmentNumberTo"
>
</hbj:label>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="4"
columnIndex="4"
>
<hbj:inputField
id="txtEquipmentNumberTo"
type="string"
maxlength="100"
disabled="TRUE"
jsObjectNeeded="TRUE"
>
</hbj:inputField>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="5"
columnIndex="1"
>
<hbj:label
id="lblEquipmentDescription"
text="Equipment Description:"
labelFor="txtEquipmentDescription"
>
</hbj:label>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="5"
columnIndex="2"
>
<hbj:inputField
id="txtEquipmentDescription"
type="string"
maxlength="100"
disabled="TRUE"
jsObjectNeeded="TRUE"
>
</hbj:inputField>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="6"
columnIndex="1"
>
<hbj:label
id="lblSerialNumberFrom"
text="Serial Number from:"
labelFor="txtSerialNumberFrom"
>
</hbj:label>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="6"
columnIndex="2"
>
<hbj:inputField
id="txtSerialNumberFrom"
type="string"
maxlength="100"
disabled="TRUE"
jsObjectNeeded="TRUE"
>
</hbj:inputField>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="6"
columnIndex="3"
>
<hbj:label
id="lblSerialNumberTo"
text="Serial Number to:"
labelFor="txtSerialNumberTo"
>
</hbj:label>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="6"
columnIndex="4"
>
<hbj:inputField
id="txtSerialNumberTo"
type="string"
maxlength="100"
disabled="TRUE"
jsObjectNeeded="TRUE"
>
</hbj:inputField>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="8"
columnIndex="1"
>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="8"
columnIndex="2"
>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="8"
columnIndex="3"
>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="8"
columnIndex="4"
>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="9"
columnIndex="1"
verticalAlignment="TOP"
>
<hbj:label
id="lblSearchFor"
text="Search for:"
labelFor="searchItems"
>
</hbj:label>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="9"
columnIndex="2"
id="cell1"
>
<hbj:radioButtonGroup
id="radioGroup"
columnCount="1"
selection="BOL"
>
<hbj:radioButton
id="BOLProducts"
text="BOL Products"
key="BOL"
tooltip="Search for BOL products"
jsObjectNeeded="TRUE"
>
<% radioGroup.getRadioButtonForKey("BOL").setClientEvent(EventTrigger.ON_CLICK, "searchBOL()"); %>
</hbj:radioButton>
<hbj:radioButton
id="MOLProducts"
text="MOL / EOL Products"
key="MOL"
tooltip="Search for MOL/EOL products"
jsObjectNeeded="TRUE"
>
</hbj:radioButton>
</hbj:radioButtonGroup>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="11"
columnIndex="1"
>
<hbj:button
id="btnSearchButton"
text="Search Products"
onClick="searchProducts"
design="STANDARD"
>
</hbj:button>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell
rowIndex="11"
columnIndex="2"
>
<hbj:button
id="btnClear"
text="Clear Search"
onClick="clearSearch"
design="STANDARD"
>
</hbj:button>
</hbj:gridLayoutCell>
</hbj:gridLayout>
</hbj:form>
</hbj:page>
</hbj:content>
Message was edited by: Kirupanand Venkatapathi
=======================================================
I don't know why the text is invisible for you. Take out the rest of the code and test only the radiobutton code.
The text is displaying fine for me.
<%@ taglib uri="tagLib" prefix="hbj" %>
<%@ page import = "com.sapportals.htmlb.enum.EventTrigger" %>
<%@ page import = "com.sapportals.htmlb.event.Event;"%>
<hbj:content id="myContext" >
  <hbj:page title="PageTitle">
  <script>
function process(){
alert('hi');
</script> 
<hbj:form id="myFormId" >
<hbj:radioButtonGroup
id="radioGroup"
columnCount="1"
selection="BOL">
<hbj:radioButton
id="BOLProducts"
text="BOL Products"
key="BOL"
tooltip="Search BOL products"
jsObjectNeeded="TRUE">
<% radioGroup.getRadioButtonForKey("BOL").setClientEvent(EventTrigger.ON_CLICK, "process()"); %>
</hbj:radioButton>
<hbj:radioButton
id="MOLProducts"
text="MOL Products"
key="MOL"
tooltip="Search MOL products"
jsObjectNeeded="TRUE">
<% radioGroup.getRadioButtonForKey("MOL").setClientEvent(EventTrigger.ON_CLICK, "process()"); %>
</hbj:radioButton>
</hbj:radioButtonGroup>
<hbj:radioButtonGroup
id="Genderselect"
columnCount="2"
selection="rb_fem" >
<hbj:radioButton
id="RBGenderFemale"
text="female"
key="rb_fem"
jsObjectNeeded="true">
<% Genderselect.getRadioButtonForKey("rb_fem").setClientEvent(EventTrigger.ON_CLICK, "process()"); %>
</hbj:radioButton>
<hbj:radioButton
    id="RBGenderMale"
    text="male"
    key="rb_male">
</hbj:radioButton>
</hbj:radioButtonGroup>
   </hbj:form>
  </hbj:page>
</hbj:content>
Message was edited by: Kirupanand Venkatapathi

Similar Messages

  • Getting javascript error while selecting the Recipients in OBIEE delivers.

    Hi All,
    I am working on OBIEE from quite a long time, but recently I came across a error while selecting the Recipients in Recipients list of OBIEE delivers.
    Making it more comprehensive, when I try to create an ibot , after entering all necessary information when I select Recipients in Recipients list and click on ok. I get a JavaScript error "null" is null or an object. The surprising thing is when i select cancel it works as ok.
    Any help will be highly appreciated
    Thanks,
    Jyoti
    Message was edited by:
    user616430

    I think you dont have a field named /BIC/XXXXXX in the table from which you are trying to fetch the data. Chech the spelling of the field name and table name.

  • How to get the values of a multiple radiobutton selection?

    Hi. I have the next region source:
    FOR c1 IN(SELECT rownum, ttexto_opcion, id_item FROM tb_opciones where id_prueba=:p_id_prueba) LOOP
    HTP.P(APEX_ITEM.radiogroup(1,c1.ttexto_opcion,1)||c1.ttexto_opcion);
    END LOOP;
    That query returns a list of records, group by id_item. For example:
    Option A Option B Option C (id_item=1)
    Option A1 Option B1 Option C1 (id_item=2)
    Option A2 Option B2 Option C2 (id_item=3)
    Option A3 Option B3 Option C3 (id_item=4)
    Imagine that this values has a radiobutton right next to them.
    Now, imagine that the user selected Option A, Option B1, Option C2 and Option C3. How could I get the values selected? Any ideas?
    Regards,
    Jeannine

    First off why are you concat the c1.ttexto_opcion to the radio button? there is an option to specify the text value.
    Like this
    begin
      FOR c1 IN(select empno,ename from emp) LOOP
         HTP.P(APEX_ITEM.radiogroup(1,c1.empno,1,c1.ename));
    --id, value, selected_value, display text
      END LOOP;
    end;Not sure you could with that. Is that region building the radio buttons like your example? if so, you need to change it so each "column" has its own global array
    So for column 1 (options A) you use this code
    HTP.P(APEX_ITEM.radiogroup(1,c1.ttexto_opcion,1)||c1.ttexto_opcion);any value selected can be retrieved using apex_application.g_f01 (1 being what p_id is)
    so for column 2 (option B)you use this code
    HTP.P(APEX_ITEM.radiogroup(2,c1.ttexto_opcion,1)||c1.ttexto_opcion);any value selected can be retrieved using apex_application.g_f02 (2 being what p_id is)
    so for column 3 (option c)you use this code
    HTP.P(APEX_ITEM.radiogroup(3,c1.ttexto_opcion,1)||c1.ttexto_opcion);any value selected can be retrieved using apex_application.g_f03 (3 being what p_id is)

  • Javascript error while selecting select option...

    Hi developers,
    I am new to javascript. Now i am developing Application form. In my form when i am selecting country in sleect box then automatically load states in states select box.
    This is my code...
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <script language="javascript">
                   function sele()
                             var con = document.frm.country.value;
                             var ap = new Array("Andhrapradesh","Tamilnadu","Karnataka","Kerala","Goa","Delhi");     
                             ap.sort();
                             if(con == "1")
                                       for(int k =0;k<ap.length;k++)
                                                 document.frm.state.options[k].text=ap[k];
    </script>
    </head>
    <body>
    <form action="regist.jsp" method="post" name="frm">
    Country <select name="country" onchange="sele()">
                        <option>---Choose---</option>
                        <option value="1">India</option>
              </select>
    State  <select name="state">
                        <option></option>
                        <option></option>
                        <option></option>
                        <option></option>
                        <option></option>     
                        <option></option>
            </select>          
    </form>       
    </body>
    </html>with Regards
    sure...:)-

    Hi developers,
    I got solutions for this. I do one mistake.
    This the solution:
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <script language="javascript">
                   function sele()
                             var con = document.frm.country.value;
                             var ap = new Array("Andhrapradesh","Tamilnadu","Karnataka","Kerala","Goa","Delhi");     
                             ap.sort();
                             if(con == "1")
                                       for(var a = 0;a<ap.length;a++)
                                                 document.frm.state.options[a].text=ap[a];
    </script>
    </head>
    <body>
    <form action="regist.jsp" method="post" name="frm">
    Country <select name="country" onchange="sele()">
                        <option>---Choose---</option>
                        <option value="1">India</option>
              </select>
    State  <select name="state">
                        <option></option>
                        <option></option>
                        <option></option>
                        <option></option>
                        <option></option>     
                        <option></option>
            </select>          
    </form>       
    </body>
    </html>with Regards
    sure...:)-

  • Using browser javascript to copy selected text from a pdf file opened in Air app.

    I have posted this question on reader forum as well, but I think it is more suited here...
    I am trying to create a note-taking application in air. I want to extract selected text from pdf file as a string object or to the clipboard.
    Obviously, all pdfs in my local storage will not be scripted to recieve postMessages and act accordingly, and that is not practical either. So, my problem is, how can I copy the selected text in the pdf file (opened as an object in htmlloader within my Air app) to clipboard or directly in another control by say clicking a button in air application? I suppose, this is possible using javascript, however, I don't know which reader methods are exposed to the wrapper htmlloader control. In short, I want to execute app.execMenuItem("Copy") command through htmlloader javascript. Any alternate solutions are also welcome.
    This is similar to passing inbuilt commands/methods/functions (of adobe reader) to pdf-reader plugin embedded in a webpage via javascript. This is possible in IE where the pdf is rendered as activex object, and hence JSObject interface of pdf document/reader is accessible to the browser javascript. I have also read that this same JSObject is accessible to VB as interface for IAC, so as the Air is Adobe's own product, I was wondering if equivalent of JSObject is accessible to htmlloader control as well.
    Thanks in advance...
    Mits

    Thank you Thom for your reply...
    from
    http://www.adobe.com/devnet/acrobat/javascript.html
    ...Through JavaScript extensions, the viewer application and its plug-ins expose much of their functionality to document authors, form designers, and plug-in developers...
    As it is explicitly mentioned, that the functionality of adobe reader are exposed for plugin development, I thought someone here might have used external javascript to execute some safe methods in adobe reader. The functionality (i.e. external javascript interface-JSObject) is already available for VB programmers to develop IAC. Further, the Acrobat SDK example called "AcroPDFinHML" shows how one can embed a pdf-reader in a html page and execute some safe methods (like gotonextpage(), zooming etc.) in IE as ActiveX plugin. I have checked it myself for adobe reader 9, and it works perfectly, so there is no security issue as such to implement the same for another browser (like in my case, the htmlloader control in flex/air app).
    I intend to create a note taking application in air, where it is very much required that I should be able to copy selected text from various pdf documents, that are open in my app, and subsequently paste/collect/save the collected notes and process them afterwords (offcourse, from the pdfs that allow me copying text). However, it is not happening for me here. As the pdfs are opened through adobe reader plugin, it does not register the copy command executed by my air app. It registers the system level copy command (by keyboard shortcut Ctrl+C), but my air app has no way to execute the system level copy command programmatically. So I am kind of stuck here...
    Thanks again for your reply. Having known what am I intend to accomplish, any other (may be alternative) solutions will be appreciated nonetheless...
    Mits

  • How to hide the select-options fields on radiobutton select in webdynpro

    hi
    Could you please help how to hide the select-option fields in webdynpro
    there are four radio buttons
    for every radiobutton there is corresponding the select_option filed is associated to it
    user as only provision select  one radio button and reset of the select-option fileds should be hidden
    which ever the radio button is selected corresponding the select-options fileld should be displayed
    please find the attachement below

    Hi Nine,
    To hide select options you should use interface method REMOVE_SELECTION_SCREEN_ITEM of IF_WD_SELECT_OPTIONS.
    Sample code :
    Write the below code in the Event handler of Radio Button.
    DATA lv_r_helper_class TYPE REF TO if_wd_select_options.
    lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
    lv_r_helper_Class->REMOVE_SELECTION_SCREEN_ITEM(exporting i_id = 'Select_option1_id1').
    This will hide first select option of your screen.Similarly pass select_option_id2 to hide it and so on.
    Regards,
    Ravikiran.k

  • To suppress certain fields based on radiobutton selection

    hi experts,
    I am having the requirement that on selection of presentation server(radio button) i need to suppress some fields like file path and name in application server(radio button) which are mandatory when application server is selected.
    Now my problem is if I leave the fields in application server blank and select presentation server then it is asking to fill in all required fields.
    Here is the code i am using:
    Selection Screen                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t08.
    *FOR APPLICATION SERVER FILE
    PARAMETERS: po_appln RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND upload,
                po_ipath TYPE filepath-pathintern  OBLIGATORY MODIF ID app,
                po_ifile TYPE rlgrap-filename       OBLIGATORY MODIF ID app.
    SELECTION-SCREEN SKIP 1.
    *FOR PRESENTATION SERVER FILE
    PARAMETERS: po_dsktp RADIOBUTTON GROUP rad1,
                po_dfile TYPE rlgrap-filename     OBLIGATORY MODIF ID prn.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM modify_screen.
    form MODIFY_SCREEN .
    *When application server radio button is checked
      LOOP AT SCREEN.
        IF po_appln EQ  'X' AND screen-group1 EQ 'PRN'.
          screen-output = '0'.
          screen-active = '0'.
          screen-input  = '0'.
        ENDIF.
        IF po_appln EQ  'X' AND screen-group1 EQ 'APP'.
          screen-input  = '1'.
        ENDIF.
    *When presentation server radio button is checked
        IF po_dsktp EQ 'X' AND screen-group1 EQ 'APP'.
          screen-output = '0'.
          screen-active = '0'.
          screen-input  = '0'.
        ENDIF.
        IF po_dsktp EQ 'X' AND screen-group1 EQ 'PRN'.
          screen-input  = '1'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    endform.         
    Can some one please help me

    Hi,
    Remove the obligatory extension in the selection-screen. Then the mandatory check will not be done when you select the radio-button.
    To handle the mandatory check of the path and file, do the checking in the event 'AT SELECTION-SCREEN'
    if sscrfields-ucomm = 'ONLI'. (Declare TABLES: SSCRFIELDS in the data declarations)
    if ipath is initial.
    message E001(z...)  with 'Please enter a file path'.
    endif.
    Regards,
    Vidya Chowdhary A.

  • Javascript alert problem - select state

    I am trying to validate my form with javascript. I'm having
    trouble with my state field. If the user selects a state javascript
    alerts the following message: "SELECT ONE is not a valid choice.
    Please choose your state." I want the alert message to pop up if
    select one is selected as a state. How do I fix this problem?

    pqer wrote:
    > I am trying to validate my form with javascript. I'm
    having trouble with my
    > state field. If the user selects a state javascript
    alerts the following
    > message: "SELECT ONE is not a valid choice. Please
    choose your state." I want
    > the alert message to pop up if select one is selected as
    a state. How do I fix
    > this problem?
    >
    >
    >
    > <script language="javascript"
    type="text/javascript">
    >
    > // check to see if the form is blank
    > function validForm(contactUs) {
    >
    >
    > if(contactUs.state.value != "SELECT ONE") {
    > alert("SELECT ONE is not a valid choice. Please choose
    your state.")
    > contactUs.state.focus()
    > return false
    > }
    if(!contactUs.state.selectedIndex) {
    alert("SELECT ONE is not a valid choice. Please choose your
    state.");
    contactUs.state.focus();
    return false;
    Mick
    >
    > </script>
    >

  • Javascript and radiobutton

    Hi,
    I am with a problem, I want to make a function in javascript to see what value has got a radiobutton.
    I can do it for all types of items but i can´t do it for radiobutton.
    Can anyone help me??? Please

    Hi All,
    I just want to make a note that, the link given by Kirupanand refers to the WebDynPro Radio Button.
    I hope, the radio butto refered by Fabien is a htmlb radio button that belongs to Enterprise Portal.
    As far as a HTMLB control is concerned,
    http://help.sap.com/saphelp_nw04s/helpdata/en/d0/55074155bcf26fe10000000a1550b0/frameset.htm
    there is no onClientClick event for the radio button or radiobuttongroup. I too don't know how to implement client-eventing for radio button.
    bye
    Vijay.K
    Message was edited by: vijay kannan

  • Javascript and sql select statement

    I am working in html db in the 10 g environment. I'm trying to create an "auto suggestion function" that predicts values as the user enters characters into a text field. I've gotten it to work by hard coding the values in the function, ie: states. btw: there are several external javascript files at work here.
    What I want is to create a dynamic link to the database to gather, say, all names of providers at the time the page is built to use in the auto suggest format. I want to put this into a javascript routine and I'm having problems finding out how to mix the sql select statement into the javascript function.
    For the states example, I'm using:
    function StateSuggestions() {
    this.states = [
    "Alabama", "Alaska", "Arizona", "Arkansas",
    "California", "Colorado", "Connecticut",..."Wyoming" ];
    Can I substitute the hard coded data (states) with a sql select statement such
    as:
    select name from <dbtable> ???
    How does this need to be "wrapped" or containerized?
    Thank you. You have a great product in html db and your site is very useful. I appreciate everything you have done to assist us. Again, thank you.

    Hi,
    You can use TRUNC with 2 arguments to get the first DATE in a month, year, quarter, week, hour, minute, ISO year, ...
    SELECT  TRUNC ( ADD_MONTHS ( SYSDATE
                               , 12
                  , 'MONTH'
                  )     AS first_of_month
    FROM    dual
    ;The DATE returned will be in the same month, year, quearter, ... as the first argument.
    \We convered the last day of the month in [your previous question|http://forums.oracle.com/forums/message.jspa?messageID=3942939#3942939].
    At that time, I warded about using LAST_DAY as a cutoff point; TRUNC is a much better way.
    For example, to find all appointment_dates in the current month next year:
    SELECT  *
    FROM    appointments
    WHERE   appointment_date >= TRUNC (ADD_MONTHS (SYSDATE, 12), 'MONTH')
    AND     appointment_date <  TRUNC (ADD_MONTHS (SYSDATE, 13), 'MONTH')Note that
    the first part of the WHERE clause calls for dates on or equal to the beginning of the 12th month in the future, but
    the second part of the WHERE clause calls for dates before, not equal to , the beginning of the 13th month in the future.

  • NEED CODE FOR RADIOBUTTON SELECTION

    Hi,
    I have a requirement that I need to display 5 Radiobuttons on output, when I select 1st Radiobutton it should show the message that "Button 1 is selected". like that if I select remaining Buttons they should display individually like 2,3,4,5 are selected.
    I Need the coding and the steps from scratch to end.
    Good answers are given excellent points.

    Hi Manikandan,
    First create a simple type in Dictionary. In the webDynpro structure go to [Dictionary -> Local Dictionary -> data Types -> Simple Types].
    Create a simple type, with <b>Enumeration</b> from <i>Enumeration tab</i> values like 1,2,3,4,5 as per your requirement.
    Now in create a attribute in context node (<i>Say: Selection</i>)and assign the type from the <b>Simple Type</b>. Select the package which you may have entered while creating the simple type and then finally bind this simple type with this attribute.
    Now create a UI element [<b>RadioBUttonGroupByKey</b>], in the <b>SelectedKey</b> property of this UI element bind the attribute which you have now created.
    Create a Action for this dropdown UI element. In this action you can write this code:
    String selection = wdThis.wdGetContext().currentContextElement().getSelection();
           if(selection.equalsIgnoreCase("1")){
           wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Button 1 is selected");
           else if(selection.equalsIgnoreCase("2")){
    wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Button 2 is selected");
           else if(selection.equalsIgnoreCase("5")){
    wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Button 5 is selected");
    I hope this will help you. For any further queries kindly revert back.
    Regards
    Pravesh

  • Regarding radiobutton selection

    Hi,
    I am having radiobutton group with yes and no values.I selected one option.How to refresh(deselect) the selected option.

    IWDRadioButtonGroupByKey: set selected key to NULL
    IWDRadioButtonGroupByIndex: set node's lead selection to IWDNode.NO_SELECTION
    Armin

  • Make fields active on radiobutton selection

    Hello all,
    I have two radiobuttons and two fields.When I select first radiobutton, field1 should be active and when I select second radiobutton field2 should be active.I am able to achieve this using at selection screen output event.But the problem is that when I select first radiobutton, field1 should be mandatory and if I switch to second radiobutton from the first one, field2 should be mandatory. When I switch from radiobutton 1 to radiobutton 2, the validation for the field2 is kicked off even before the field is avaiable for input.How to achieve this?
    Thanks
    Sandeep

    hi ,
    *& Report  ZVENKATTEST0
    REPORT  ZVENKATTEST0.
    TABLES:MARA.
    SELECT-OPTIONS:S_TEST1 FOR MARA-MATNR MODIF ID M1 ,
                   S_TEST2 FOR MARA-MEINS MODIF ID M2 .
    PARAMETERS:P_RAD1 RADIOBUTTON  GROUP G1 USER-COMMAND UC1 DEFAULT 'X',
               P_RAD2 RADIOBUTTON GROUP G1 ,
               P_RAD3 RADIOBUTTON GROUP G1 .
    AT SELECTION-SCREEN OUTPUT .
      LOOP AT SCREEN.
        IF P_RAD1 = 'X'.
          IF SCREEN-NAME = 'S_TEST1-LOW' .
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-NAME = 'S_TEST1-HIGH' .
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-NAME = 'S_TEST2-LOW' .
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-NAME = 'S_TEST2-HIGH' .
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
       ENDIF.
          IF P_RAD2 = 'X'.
            IF SCREEN-NAME = 'S_TEST1-LOW' .
              SCREEN-INPUT = '0'.
              MODIFY SCREEN.
            ENDIF.
            IF SCREEN-NAME = 'S_TEST1-HIGH' .
              SCREEN-INPUT = '0'.
              MODIFY SCREEN.
            ENDIF.
          ENDIF.
            IF P_RAD3 = 'X'.
              IF SCREEN-NAME = 'S_TEST2-LOW' .
                SCREEN-INPUT = '0'.
                MODIFY SCREEN.
              ENDIF.
              IF SCREEN-NAME = 'S_TEST2-HIGH' .
                SCREEN-INPUT = '0'.
                MODIFY SCREEN.
              ENDIF.
            ENDIF.
         ENDLOOP.
    regards,
    venkat.

  • Adobe JavaScript printing page selection

    Hello,
    1) I succeeded printing documents using JavaScript with pp.firstPage and pp.lastPage. Now I would like to print several single pages (e.g. pages 4, 7, 10) within a single print job.
    If I make several print jobs, the paper is ejected after each job. This should not happen, as I want to print in duplex mode.
    Does anyone know, how to do this?
    2) In the internet I could only find the JavaScript documentation for Adobe Version 6: https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/Acro6JS1.pdf
    Is there any newer version?
    BTW: I am using the free version of Adobe which does not support all features.
    Thanks for your help!

    Thanks to Bernd Alheit and GKaiseril  !
    The docu for Version 11 is:
    http://help.adobe.com/livedocs/acrobat_sdk/11/Acrobat11_HTMLHelp/wwhelp/wwhimpl/js/html/ww help.htm?&accessible=true 
    In the new docu for Version 11 I found the parameter which I looked for:
    With PrintParams::printRange it is possible to print any selection of pages just in one print job. Multiple printing of a special pages is possible too.

  • Arithmatic(add, sub, mult) operations using radiobutton Selection

    Hi,
    I want to create simple arithmatic operation program, in that I want to use radiobutton for selection of type of arithmatic( addition or subtraction etc) and display output. This output is concerned about the selection of radioutton. please anyone give me idea about this.

    Hi,
    this is an example (sum and subtract) that you could extend
       DATA W_NUM TYPE I.
    SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_NUM1 TYPE I OBLIGATORY,
                P_NUM2 TYPE I OBLIGATORY.
    SELECTION-SCREEN SKIP.
    PARAMETERS : P_ADD RADIOBUTTON GROUP GR1, "sum
                 P_SUB RADIOBUTTON GROUP GR1. "subtract
    SELECTION-SCREEN END OF BLOCK BL1.
    START-OF-SELECTION.
      CLEAR W_NUM.
      PERFORM CALCULATE USING P_NUM1 P_NUM2.
      WRITE W_NUM.
    *&      Form  CALCULATE
    FORM CALCULATE  USING  PR_NUM1
                           PR_NUM2.
      IF P_ADD EQ ABAP_ON.
        COMPUTE W_NUM = PR_NUM1 + PR_NUM2.
      ENDIF.
      IF P_SUB EQ ABAP_ON.
        COMPUTE W_NUM = PR_NUM1 - PR_NUM2.
      ENDIF.
    *others operation
    ENDFORM.                    " CALCULATE
    Regards
    Ivan

Maybe you are looking for

  • Enable SAP Inbound email through IMAP, POP3 & MAPI instead of SMTP

    Hi, I am trying to configure SAP Inbound email in CRM 6.0 and would like to know if I can use IMAP, POP3 or MAPI instead of SMTP due to our company's legal policies and maintenance purposes. If there is a way, please let me know how to? I have checke

  • Getting two errors on sending mail (code included)

    I receive an authentication failed exception when I run it like this. When I connect without an authenticator, I get a "relaying error". I got it to send a message a few weeks ago, and now come back to it and seem to be getting these errors. Any help

  • What should I do to create  an planning area?

    Hi everyone , what should I do to create  an new planning area? best regards, David

  • Need Help with Dates

    I am printing a calendar and certain events will be helds on certain dates. One can edit the event if it has not passed the date. Events in the past can be viewed but not edited. When I query the database the date must be formatted dd-MMM-yy I am abl

  • Authobject for SAP collaboration assignment block in Solman 7.1

    Hi Guru, I am trying to find the authorisation object for edit option in SAP collaboration assignment block in Solman 7.1. The edit button is disabled. I could not find it through trace as it was greyed out. Could you please suggest which authorisati