How to disable when one radio button is selected
Hi Folks,
One of our requirement is as follows,
Scenario: We have two columns with radio buttons and two dropdown box for the same columns to select the values.
Requirement: When user select one radio button then the other radio button and its relevant dropdown both is disabled.
Radio Buttons:
Company
EmpNo
Dropdown Box:
Company
EmpNo
If CompName Radio button is selected then Radio Buttom and Dropdown Box for Policy Id is disabled.
Finally, The filter is applied on CompName to populate the values in dropdown
Thanks Guys,
KK
look for a function like setActive or setDisable
Similar Messages
-
How to handle Event when a radio button in selection screen is clicked
Hi all,
What is the Event generated when a radio button is clicked in the selection Screen. My requirement is .If one radio button is clicked a field in selection screen should be greyed.
Here I used AT SELECTION-SCREEN OUTPUT. but this event is generated only if i press 'ENTER' after clicking the radio button in the selection screen.
Is there any other way to process this radio button event?
Thanks&Best Regards,
Vishnuhi,
try like this
TABLES : kna1,lfa1.
SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-002.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : rad_but1 RADIOBUTTON GROUP one DEFAULT 'X' USER-COMMAND ucom.
SELECTION-SCREEN COMMENT 3(26) text-003.
SELECT-OPTIONS : kunnr FOR kna1-kunnr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : rad_but2 RADIOBUTTON GROUP one .
SELECTION-SCREEN COMMENT 3(26) text-004.
SELECT-OPTIONS : lifnr FOR lfa1-lifnr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN:END OF BLOCK blk1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF rad_but1 = 'X'.
IF screen-name = 'KUNNR-LOW' OR screen-name = 'KUNNR-HIGH' .
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'LIFNR-LOW' OR screen-name = 'LIFNR-HIGH'.
screen-input = '0'.
REFRESH lifnr.
MODIFY SCREEN.
ENDIF.
ENDIF.
IF rad_but2 = 'X'.
IF screen-name = 'KUNNR-LOW' OR screen-name = 'KUNNR-HIGH'.
REFRESH kunnr.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-name = 'LIFNR-LOW' OR screen-name = 'LIFNR-HIGH'.
screen-input = '1'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
reward if usefull.... -
Disable only one radio button in a Radiogroup using Dynamic Actions.
Hello everyone,
I'm using Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit with Application Express 4.1.1.00.23
I have a radio group which has 3 radio buttons. Now in certain situations I want only one of the radio buttons to be disabled.
I don't want to resort to Javascript for this as that would mean another piece of code that can go wrong and introduce bugs.
Is this possible using a Dynamic Action? Although DA is also JS, I feel its much easier to maintain.
Regards,
ArijitI know, you did ask for DA
Try to put this code in DA and run this code on page load
=-==========================================
var pOption = 3;
var nameArray = $('input[name=p_v01]').map(function(){
return this.getAttribute('value');
}).get();
for (i=0;i<nameArray.length;i++){
if(pOption == nameArray[i]){
$("#P2_CHECK1_"+i).attr("disabled", true);
==========================================
Plain Javascript
<script type ="text/javascript">
function disableCheckBox(pOption){
var nameArray = $('input[name=p_v01]').map(function(){
return this.getAttribute('value');
}).get();
for (i=0;i<nameArray.length;i++){
if(pOption == nameArray[i]){
$("#P2_CHECK1_"+i).attr("disabled", true);
$(document).ready(function(){
var chkOption = 3;
disableCheckBox(chkOption);
</script>
Thanks,
Ramesh P. -
How to disable the single radio button in radionbuttongroup????
Hi Experts,
I created the RadiobuttonbyKey UI element and i have set it to the SimpleType which has two values.Say Ex:
Simple Type : 1 bus
2 train
My Requirement is onActionxxxx i have to display only one raiobutton in the Group and onActionyyyy i have to show both the radiobuttons in the group.
Can anyone please help me how to achieve this..............
Regards,
Maheshhi Mahesh ,
which UI element you are using ......radio button group is group by key or group by index ?
if it is group by key above specified code holds ,
if is group by index , then you have bind a node of cardinaility 0...n and with one attiribute in that node.
in onActionxxxx()
wdcontext.nodeRadioButton().invalidate();
IPrivateDynamicTableView.IRadioButtonElement element;
element = wdContext.createRadioButtonElement();
element.setValueRadioButton("Train");
wdContext.nodeRadioButton().addElement(element);
and in onActionyyyyy()
wdcontext.nodeRadioButton().invalidate();
IPrivateDynamicTableView.IRadioButtonElement element;
element = wdContext.createRadioButtonElement();
element.setValueRadioButton("Train");
wdContext.nodeRadioButton().addElement(element);
element = wdContext.createRadioButtonElement();
element.setValueRadioButton("Bus");
wdContext.nodeRadioButton().addElement(element);
Regards
Govardan Raj -
Add radio button when a radio button is selected (pop up)
How do you Add a 2 radio buttons when (pop up when d1 is
selected)
For example d1a and d1b
When d1 is selected.
<cfoutput>
<cfif isdefined("url.msg")>
#urldecode(url.msg)# <BR />
</cfif>
</cfoutput>
<table border="0" cellpadding="5">
<form id="form1" name="form1" method="post"
action="index.cfm?action=actSearch">
<tr>
<td>please enter id no: </td>
<td><input type="text" name="nbr" /></td>
</tr>
<tr>
<td>B1: </td>
<td><input type="Radio" name="bd" value="b1"
checked="checked"></td>
</tr>
<tr>
<td>D1: </td>
<td><input type="Radio" name="bd"
value="d1r"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="Submit"
value="Submit" /></td>
</tr>
</form>
</table>As you may already know, ColdFusion code runs on the server.
It's not sent out to the web browser. It sends out HTML to the
browser. And what you want to do here is regonize a change that
occurs in the web browser without submitting the form. The way you
can do this is AJAX. If you haven't already done so, check out the
ColdFusion / AJAX library here :
http://ajaxcfc.riaforge.org/.
This will give you a good framework of code to use to do this so
you won't have to reinvent the wheel. -
To make a push button invisible when a Radio button is selected.
Hi,
There are 5 radio buttons in a group. Out of those when st and 3rd are selected a push button should be made visible else invisible.
The problem is that when the transaction is executed by default the first radio button will be selected but the push button wont be visible.But if i re-select the 1st radio button then the push button will be visible.
So is there any way to make the push button visible when the transaction is executed(ie bcoz the 1st radio button is by default selected) or neither of the radio buttons should be selected by default.
Thanks in advance.Hi Sridhar,
For example say your PF sataus name is 'STATUS-100' which contains the push button and function code for the button in 'PUSH', then in your part of code use the following syntax,
Here 'rb_select' is your radio button.
IF rb_select EQ 'X'.
SET PF-STATUS 'STATUS-100' EXCLUDING 'PUSH'.
ENDIF
I hope this will help you.
Regards,
Manoj Kumar P
Edited by: Manoj Kumar on Dec 15, 2008 12:03 PM
Edited by: Manoj Kumar on Dec 15, 2008 12:03 PM -
How to enable/disable an image button when one radio button is checked?
The checked radio needs to equated with some value , if it returns true, then the Image button for submit should be disabled.otherwise, it needs to be disabled always.please help me to pass th' this requirement.
Thanks in Advancelook for a function like setActive or setDisable
-
How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?
I’m creating a form where the user has three options to make a payment.
1. charge to my credit card
2. charge associated costs to bank account
3. By cheque or money order
My Problem is, under each option, there are required fields that has to be filled out. So if the user picks the first option, charge to my credit card, they would fill out the required fields (credit card number, expiration date etc.). But when they click submit button to submit the form, it won’t let them, because there are required fields under the second option. Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it. So what I'm trying to do is this: If the user selects the radio button for option 1, the other two options are greyed out/disabled. And if the user holds down the shift key and clicks radio button for option one again, it unchecks the radio button and the other two options are available again. Is there a way to grey out or disable the two other payment options when the other one is picked. I’m assuming I will have to use javascript, but what would the coding be and which field do I write it under?
Thanks in advance guysYou will have to use custom JavaScript to access the various properties of the field object.
The radio button group has a value. When no button is selected that value is "Off". When an individual button has been selected the value for the group will be the option or export value for that individual button.
Once you have determined the button selected, then you will know the form fields that need to be made required. You use JavaScript to access those fields and change the "read only" property to false, and set the "required" property to true. For the fields associated with the other options, those fields should be reset, made read only, and have the "required" property set to false.
Disabling (graying-out) Form Fields
>> Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it.
Radio button in a PDF do not work that way. Only check boxes can be unchecked by clicking on one that has been checked.
If you plan the coding for the Mouse UP action to test for all possible options and code for each of those options you should have what you want.
If you want actual code you need to provide a lot more details.
It is even possible to perform some credit card and bank routing number validations with JavaScript and some check digit formulas. -
How to make buttons as disable based on radio button selection in .htm
Hi
I have two radio buttons. So i want that when i select one radio button other buttons should become disable in
.htm in crm webui.
Thanx,
Nawal kishore.I am not sure why u need this .. but if you disable the radio button, user won't be able to change the radio buttons any more!!!
You can do it in this way.
1. go to the radio button attribute of the context node ..
if get_p_xxxx method is present then modify that to include the below code. If not present create the method. see any standard method
CASE iv_property.
WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
rv_value = 'selected'. "remember case
endcase.
2. create a event with the name 'selected'. "" case is important
3. check in do_handle_event if the event is created or not..." if there is not event added in that method, you need to add your method name there...
4. set some flag in the event method which you have to access from the get_i_XXX method(XXX is the radio button attribute).
depending on the flag you make it disable. -
Enable/disable/defaulting the radio button in tabular Form
Hi friends,
I have one radio button column in my tabular form with 3 values for it.
<li>FC
<li>BC
<li>EC
I need to enable/disable the radio buttons according to the position of the user.
If the position of the user is CEO means,
then FC radio button has to be checked defaultly and also for him he needs to have BC and EC radio buttons to be enabled.
If the position of the user is between(1-4) grades means,
then FC radio button has to be disabled, but BC radio button has to be checked defaultly and also for him he needs to have EC radio buttons to be enabled.
If the position of the user is between(4-6) grades means,
then FC, BC radio button has to be disabled, but EC radio button has to be checked defaultly.
How i can achieve this radio button enabling/disabling and defaulting it dynamically according to the user.
Where i need to specify this kind of restriction inorder to work for me in my application.
Brgds,
MiniHi Bob,
thanks for your reply first, and your suggestion too.
I tried in the below manner on the lov definition of my radio button and it hide/shown according to the user who logs into the application.
SELECT 'FC' d, 'FC' r FROM DUAL WHERE lower(:APP_USER) = (select lower(user_name) from apps.xxhy_ams_details_v where upper(job_name) = 'CEO')
UNION ALL
SELECT 'BC' d, 'BC' r FROM DUAL WHERE lower(:APP_USER) IN (select lower(user_name) from apps.xxhy_ams_details_v where grade_name
BETWEEN 1 and 4 OR lower(:APP_USER) = (select lower(user_name) from apps.xxhy_ams_details_v where upper(job_name) = 'CEO'))
UNION ALL
SELECT 'EC' d, 'EC' r FROM DUALBut how i can check the radio button defaultly according to the user who logs in .
<li> If the employee with the position CEO logs into the application means, he needs to have FC to be checked defaultly.
<li> If the employee with the grade between(1-4) logs into the application means, he needs to have BC to be checked defaultly.
<li> If the employee with the grade between(5-12) logs into the application means, he needs to have EC to be checked defaultly.
Note:
Instead of hide/show the radio buttons defaultly whether it is possible to enable/disable the radio button according to the user who logs into the application.
Brgds,
Mini... -
Using Adobe Acrobat Pro X, we created a fillable PDF from an existing PDF.
One question can be answered by choosing one of four choices (radio buttons). The answers are laid out in a 2-by-2 arrangement.
When Acrobat Pro converted the PDF into fillable format, it thought that the radio-button answers on the second column are not part of the question.
How can I manually override Acrobat and make choices 3 and 4 part of the question.
Please click attached screenshot for better zoom.George,
i am the OP. I mistyped my email address and cannot log in to my original account.
Thanks for your reply.
How do I give each radio button the same name but unique button values?
I right-clicked the first radio button, chose Properties (Ctrl+I).
I copied the name: "What is your personal net worth in Canadian dollars including spousecommon law partner if applicable".
I clicked Close.
I then went into the Properties dialog window of the third radio button, which is one of the ungrouped choices. I pasted the name [What is your personal net worth in Canadian dollars including spousecommon law partner if applicable]. I then clicked Close.
I get an error message pop up:
A field of a different type already uses this name. Please choose a new name for the field, or change the field type to match the existing field with this name.
What must I do now?
Thanks. -
One radio button flag is stored as'Y' in backend
Dear All,
Good Evening
i have 5 radio buttonss,these radio buttons have one radio group,
i want to select only one radio button at a timee
before saving i select 1 radio buttonnn
no i don't want to store that record with first radio button valuee
so i select 4 th radio buttonnn
and save that recordd
that time i want to save only 4 th radio button value as 'Y'
remaining are nulll
but here both 1st and 4th radio button values are 'Y'
how to resolve this problemI did not think that it was Google, so I created a stripped-down version of the page, removing all scripts, Google and mine. The Google interface just selects a spot on the map. My script converts this to a UK Grid reference which is then fed to the form. In the stripped down version, the form is given a typical value.
The form will still will not perform as per spec, neither on my PC nor on my server.
Here is the form:
<pre><nowiki><form id="form1" name="form1" method="get" action="../cgi-bin/findPix.py">
<p><label>Grid reference <input name="gridref" id="gridref" type="text" value="TQ776887" /></label>
</p>
<p> <label>Enter maximum number of images to find:<br />
<input name="maxcount" id="maxcount1" value="1" type="radio" /> One
<input name="maxcount" id="maxcount5" value="5" checked="checked" type="radio" /> Five
<input name="maxcount" id="maxcount10" value="10" type="radio" /> Ten
<input name="maxcount" id="maxcount20" value="20" type="radio" /> Twenty
</label></p>
<p> <label>Enter the maximum distance to look from your
chosen point:<br />
<input name="maxdist" id="maxdist1" value="1" type="radio" /> One Km
<input name="maxdist" id="maxdist2" value="2" checked="checked" type="radio" /> Two Km
<input name="maxdist" id="maxdist5" value="5" type="radio" /> Five Km
<input name="maxdist" id="maxdist50" value="50" type="radio" /> Unlimited
</label></p>
<input name="button" id="button" value="Submit" type="submit" />
</form></nowiki></pre> -
Select one radio button at a time
Hi all,
my webdynpro table contains 3 rows. each row contains one radio button. at a time i should select only one radio button and bydefault the first one should be select.
Thanks,
SagarikaHi,
when the view will load, bydefault radio button of first row of webdynrpo table should check. in this part i am facing problem.
in my onaction-method i wrote the down code for 'deselect radio button if i will select other one'.my node is 'paticipants'.
" Uncheck other Radio button if selected
DATA: lo_nd_participants TYPE REF TO if_wd_context_node,
lo_changed_elem TYPE REF TO if_wd_context_element,
lo_elem TYPE REF TO if_wd_context_element,
lt_elem_set TYPE wdr_context_element_set,
ls_chgd_participant TYPE LINE OF wd_this->elements_participants,
ls_participant TYPE LINE OF wd_this->elements_participants.
FIELD-SYMBOLS:
<fs_participant> TYPE LINE OF wd_this->elements_participants.
" Get the changed context row
CALL METHOD wdevent->get_context_element
EXPORTING
name = 'CONTEXT_ELEMENT'
RECEIVING
value = lo_changed_elem.
" Get static attributes
CALL METHOD lo_changed_elem->get_static_attributes
IMPORTING
static_attributes = ls_chgd_participant.
" Navigate from <CONTEXT> to <PARTICIPANTS> via lead selection
lo_nd_participants = wd_context->get_child_node( name = wd_this->wdctx_participants ).
IF lo_nd_participants IS INITIAL.
RETURN.
ENDIF.
" Get all the selected elements from the context
lt_elem_set = lo_nd_participants->get_elements( ).
" Process the elements
LOOP AT lt_elem_set INTO lo_elem.
CALL METHOD lo_elem->get_static_attributes
IMPORTING
static_attributes = ls_participant.
IF ls_participant-prim_userid NE ls_chgd_participant-prim_userid.
ls_participant-admin_ind = abap_false.
lo_elem->set_static_attributes( ls_participant ).
ENDIF.
ENDLOOP. -
Radio button and select option in one line
Hi,
I have an requirement in which i need to display the radio button and select option in one line in an report program.
How can i do it?
Regards,
Arun.Hi,
Try this code.
TABLES: bkpf.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_r1 RADIOBUTTON GROUP a.
SELECTION-SCREEN COMMENT 4(20) text-001 FOR FIELD p_r1.
SELECTION-SCREEN COMMENT 30(12) text-002 FOR FIELD p_date.
SELECTION-SCREEN POSITION 39.
SELECT-OPTIONS: p_date FOR bkpf-budat OBLIGATORY.
SELECTION-SCREEN END OF LINE.
PARAMETERS: p_r2 RADIOBUTTON GROUP a.
text-001 = " Radio button"
text-002 = "Posting date" -
Short dump ( PNP LDB )More than one radio button is active
Hello Guys!!!
I am working on HR report and Im using <b>PNP LDB</b> . on output when I select Current month and select personal area single values and hit execute button . Its giving me short dump <b>More than one radio button is active </b> . Why is that any body can help me ?
Cheers
UsmanAlso check on AT SELECTION-SCREEN OUTPUT. You`re not selecting any of them too...
Checkout this code ..
I declare PNP in attributes and AT SELECTION-SCREEN OUTPUT.
PNPTIMR5 = ' '.
PNPTIMR3 = 'X'. ( Just comment it or give error message )
its giving short dump ,if I try to do the same thing you describe in your post !
Hope thisll help you
Thanks
Saquib
Maybe you are looking for
-
I want to be able to have a smart playlist that contains all of my devices downloaded to my iOS device.
-
How to delete a table in spite of a Reference...
Hi, i have a little Problem... I made two tables: CREATE TABLE one( NR INTEGER, xyz INTEGER REFERENCES two(abc), PRIMARY KEY (NR) CREATE TABLE two( abc INTEGER, jhg CHAR(3), PRIMARY KEY (abc) Now i want to delete table two: DROP TABLE two; But then t
-
Can't find Apple TV on my MacBook on the same Wifi.
I use public Wifi in my apartment which requires registration to use it. My macbook and apple TV is registered to the system separately and they work well. I can do web-surfing with my laptop and watch youtube with my apple TV. However, my laptop can
-
i accidently clicked on an advertisement banner on the app formspring, and i am worried that the website the ad took me too may have a virus that will steal accounts from my ipod. i am using an ipod touch 4g
-
Visitors can't subscribe to my iWeb website blog. All ideas are welcome.
Hello, good people. OK. I've figured out the PDF issue. Thanks. Visitors to my iWeb website, nancysolomon.net, cannot subscribe to my blog. It's not that what I have to say is so important, but I would like to offer that option. Because they can't su