Check box based on dropdown selection
I have a dropdown menu with three choices: Level I, Level II and Level III. If the user selects "Level I" from the menu, I need a checkbox named levelI to be checked. If they select "Level II", I need the checkbox named levelII to be checked, and so on.
I don't care if the boxes are checkboxes or radiobuttons. I don't know if the code needs to go in the dropdown menu field or in the checkbox/radio button fields. If you can help, please be sure to specify whether this would be entered on a change event, or exit event, etc. because I am clueless about this one!
I've tried all of the code combinations I can come up with based on my limited Javascript knowledge but nothing is working and I can't find any examples of this online...
First make sure the Object > Binding tab of the dropdown you tick 'specify item values'. Then in the exit event of the dropdown menu put (in formcalc):
if ($ == 1) then
levelI = 1
levelII = 0
levelIII = 0
elseif ($ == 2) then
levelII = 1
levelI = 0
levelIII = 0
elseif ($ == 3) then
levelIII = 1
levelI = 0
levelII = 0
endif
Similar Messages
-
Check box in SAP Query selection screen
I want to keep 2 check box in SAP Query selection screen.
could you please tell me any one.
regards,
kumarHi Vijay,
If these check boxes are the fields in the table you are using then you can do it in SQ01, otherwise you may required to make the changes in the standard code generated for that query.
You can find the name of the generated program of the query when you execute the query.
Reward points if useful.
Regards,
Atish -
Putting a check box above column for selection in WD ALV
Hi,
Can anyone provide me a code snippet and help me how I can
provide a check box above column for selection in WD ALV.
Best Regards
SidHi Sid,
As far as I know we cannot put checkboxes directly above the Column headers.
You can achieve this functionality in a round above method
You can create a group of checkboxes above your ALV table with names of columns to be selected beside each check box and proceed with your further processing.
Also If you are just looking at which columns you need to select to be shown on the
ALV output
data: lr_standard_functions type ref to if_salv_wd_std_functions.
lr_standard_functions ?= wd_this->r_table.
lr_standard_functions->set_column_selection_allowed( ' ' ).
Hope this is of some help.
Regards,
Ismail.
Edited by: Ismail Basha on Jan 23, 2008 1:47 PM
Edited by: Ismail Basha on Jan 24, 2008 3:23 AM -
How to populate a dropdown box based on a selection in another Dropdown box.
I am trying to find out a way to do the following:
I am using coldfusion ....working on a form. The form has
couple of dropdown boxes. Based on the selection on the first
dropdown box another dropdown box needs to get populated with
different options. These options will be coming from a query. I am
trying to find out the Javascript code for doing this.
Thanks in advance.jchopra,
There's a method to doing what you're wanting to do that I've
used extensively.
Basically, within my code, I start by invoking the method
that returns the data for the dropdown lists. Then, I use the
following code to pour the data returned into a javascript array:
var locArray = new Array(#evaluate(locs.recordcount+1)#);
locArray[0] = new Array('','','','','','','','','',);
<cfloop query="locs">
locArray[#locs.CurrentRow#] = new
Array('#JSStringFormat(locationId)#',
'#JSStringFormat(fkyPolicyId)#',
'#JSStringFormat(locationNumber)#',
'#JSStringFormat(description)#',
'#JSStringFormat(address1)#',
'#JSStringFormat(address2)#',
'#JSStringFormat(zipcode)#',
'#JSStringFormat(city)#',
'#JSStringFormat(state)#';
</cfloop>
Then I wrote a javascript function that is assigned to the
first dropdown's onChange() event. When the user changes the value
that is selected within the dropdown, I use javascript to locate
(using the policyid) the corresponding record in the javascript
array and populate and/or select the appropriate value(s) in the
second dropdown.
If the data returned from the method invocation is too large
to use within a javascript array, you may need to limit the results
that are returned.
Hope this makes sense. If not, please let me know.
ds -
Hide/Show Pages Based On Dropdown Selection
Hello,
This one is driving me crazy. In this form (attached) I have 3 checkboxes and based on what is checked, I want to hide the first page and navigate to the 1st checked box. It works for the Web Chat option, but all others do not. Also, on the next button from the Web Chat page, when I click next, I have an alert pop that should only show if Web Chat is the only selection chosen, but it shows no matter how many selections are made from the checkboxes.
As always, any help is appreciated!Hello,
That took care of the popup issue, but the navigation is still a problem. For some reason choosing any option from the checkboxes and any option from the Type of setup dropdown always brings me to either a blank page or the Web Chat page.
Thanks for looking into this, hopefully you (or another member) can assist with this issue as well. -
Auto populate fields based on dropdown selection
New to forms and needing some insight
Is there a way to auto populate a series of fields based on the selection of a dropdown box
for instance;
chosing a customer's name from a dropdown box would auto populate the address, city,state zip etc...Yes, but not easy and you do not want to have a large number of items.
Programming List and Combo fields in Acrobat and LiveCycle forms - Part 1 by Thom Parker -
Can a check-box be used to select more than one value
Hi, I have a form with a check-box that only allows one selection at a time. I have a requirement now to allow the user to select multiple selections. How can I accomplish this with a checkbox? Please help.
Then i didn't get your actual form-design.
Well there are 14 items displayed for each 14 denial reasonSo you have 14 items where each is for one denial reason, or 14 items where each has 4 denial reasons (14x14)?
They are all 'grouped' as one check_box item in the blockWhat does that mean. For the 14 items there is one checkbox? And what is the meaning if you check it?, and what if you uncheck it?
so I don't quite know how to be able to check 2 or more reason per recordAs far as i understand you, you would have to have 14 checkboxes, one for each reason, which can be individually checked/unchecked. -
SQ01 - Include a check box on ABAP query Selection screen
Hi Experts,
For my Abap Query, on the selection screen i am planning to include a check box such that if i click on the check box then a field will be displayed in the resulting output . On the other hand if i do not check on i should not be able the field in the output.
Please tell me how do i do this.
Thanks
Venkata Pradeep.In infoset, Extras code tab
Code section: At selection-screen output
Do something like below:
IF radiobutton1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'XXXX'. "XXX is the filed group name you want to hide., you have to find out what is it.
screen-input = '1'.
screen-invisible = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'XXX'.
screen-input = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF. -
ADF Tree with Boolean Check Box: How to find selected items
Hi Experts,
ADF: 11.1.1.5.0
WLS: 10.3.6
I am using an ADF Tree which contains elements at two levels (say Departments and Employees). My requirement is to give provision for user to select Departments and Employees using the check boxes. User should be able to select what ever Departments he/she likes and what ever employees he/she likes. There should not be a provision to select Employee with out selecting the corresponding Department (root node in the tree).
I am facing the below issues while trying to implement this use case:
1. Always, only the first master record will be expanded by default (I am using "Display Row" property value as "default" and "ExpandAllEnabled" as "true"). My need is to expand all the master records by default. So that user need not explicitly expand each master record node and then select the associated child records.
2. Currently, I am using value change listener associated to af:selectBooleanCheckBox to identify the Departments and Employee records that have been selected. Since not all departments (masters) are expanded by default, if user selects the check box of department (master) and then expands the department node, automatically all the employees of that department are selected. But, this event is not triggering the value change listener for the employee records. Because of this, after a department node is selected and then expanded, all the child elements' check boxes are selected but the events are not generated. Hence, I am not able to capture the selection of employee records.
To summarize,
1. Please let me know how to expand all master nodes in af:Tree by default.
2. Please let me know the best approach to identify the selected items (both master and detail items) in the af:Tree component using af:selectBooleanCheckBox.
Thanks in advance,
RathnamHi,
Can you please elaborate the solution? I have a similar problem in
https://forums.oracle.com/thread/2579664 -
How to disable and enable Check box based upon condition
Hi,
I wants to disable/hide the check box field before the required field is filled. Kindly help meHi Mohammed,
Try to use customize InfoPath form, add rules. Go to list tab, click customize Form, then this opens the list form in InfoPath
format.
1.Select the check box field control, click add rules, select if is blank, show validation error action.
2.Then go to conditions, click column name is blank, change it to the required column you want.
3.Go to rule type, click validation, change it to formatting, select hide this control.
4.Publish the InfoPath form.
Best Regards.
Kelly Chen
TechNet Community Support -
How to check the "check box" based on an event on form
Hi,
I have couple of text items and a check-box on a form. Is there a way I can check the box automatically when the text item values are edited/enterd by user ?
I'm using the JS shown below but it doesn't work.
I have this JS in page header.
+<script type="text/javascript">+
+function checkTheBox() {+
document.getElementById('MY_KBOXNAME').checked='checked';
+}+
+</script>+
And I have this in my form element options.
onChange=checkTheBox();
What am I doing wrong?
Thanks in advance,
AshaHi,
For checkbox with name P1_CHECKBOX , first checkbox is refferred using P1_CHECKBOX_0 , second one using P1_CHECKBOX_1 and so on..
Change document.getElementById('MY_KBOXNAME').checked='checked' . instead of MY_KBOXNAME , use MY_KBOXNAME_0, MY_KBOXNAME_1 ETC depending which checkbox you want to check.
Regards,
SK -
Setting the visibility of check box based on values of dropdown field
Dear Experts,
I have to set the checkbox visible/hidden based on the values of dropdown field.
Request you to please provide code example.
Regards,
UpendraHi,
For capturing the selected value from the dropdown (ComboBox in SAPUI5) field use the change event of the combobox UI element. Within this you can get the selected value using the getLiveValue() method of the combobox.
Then depending on the value you can set the visible boolean property of your checkbox.
Refer to the link ComboBox for more details.
Regards,
Saurabh -
Populate 2nd combo box based on value selected in 1st combo box
I am still using Acrobat 6 though I may be upgrading soon to Acrobat 8. I have a form with two combo boxes, the first "state" has values of MN and WI. Based on which value the user picks I would like to populate a "county" combo box with lists of counties that we deal with.
Thanks,
GeneOne can set the option and export value using an arry:<br /><br />// document level script<br />// Master List of Lists <br />// Each entry in this object listeral is the name of a State <br />//Manually enter the State Names into the state field combo box <br />// The associated value is the item list, where each item is a name value pair, [<County> and [county code, zip code]] <br /><br />// state: ["county name", ["county code", "zip code"]]<br />var oStateNames = {MN: [["-", ["", ""] ], <br /> ["St. Louis", ["MNStl", "55001"] ], <br /> ["Carlton", ["MNSCrl", "55002"] ], <br /> ["Pine", ["MNPin", "55003"] ],<br /> ["Cook", ["MNCok", "55004"] ] <br /> ], <br /> WI: [["-", [" ", " "] ],<br /> ["Douglas", ["WIDou", "55005"] ] ,<br /> ["Bayfield", ["WIBay", "55006"] ],<br /> ["Burnette", ["WIBur", "55007"] ],<br /> ["Ashland", ["WIAsh", "55008"] ]<br /> ]<br /> }; <br /><br />//SetCountyEntries() on keystroke entry in state field <br />function SetCountyEntries() <br />{ <br /> if(event.willCommit) <br /> { <br /> // Get the new counties list from the Master List <br /> // Since the selection is being committed, <br /> // event.value contains the State name <br /> var lst = oStateNames[event.value]; <br /> // Clear the county list if there are no counties for the selected state <br /> this.getField("ee.address.county").clearItems();<br /> this.resetForm(["ee.address.code", "ee.address.zip"]);<br /> if( (lst != null) && (lst.length > 0) )<br /> this.getField("ee.address.county").setItems(lst); // set opiton and export value<br /> } <br />} <br />// end document level script<br /><br />For the combo box "ee.address.county" one can create an array from the export value to populate the county code and zip code<br /><br />// custom keystroke for county combo box<br />if(event.willCommit & event.value != "") {<br />// split county and zip codes<br />var aCodes = this.getField(event.target.name).value.split(",");<br />this.getField("ee.address.code").value = aCodes[0];<br />this.getField("ee.address.zip").value = aCodes[1];<br />}<br />// end custom key stroke code
-
Dynamic population of second list box based on the selection of first list
Hai Friends,
I have the code like this.
Here my issue is: when the user accesses this page he will get the topic and related categories in the drop down boxes. but when the user changes the topic it needs to populate the categories from the database and kept the topic same for the respective categories. so how can i do this?
<form name="questionForm" method="post" action="listQuestions.lgs">
<table bgcolor="F8D8D8" cellspacing="2" cellpadding="2" align="center"
style="margin-top: 100px">
<tr>
<td>Topics:</td>
<td><select name="topic">
<c:forEach items="${model.topics}" var="topic">
<option value="<c:out value="${topic.topicId}" />"><c:out
value="${topic.topicName}" /></option>
</c:forEach>
</select></td>
<td>Categories:</td>
<td><select name="category">
<c:forEach items="${model.categories}" var="category">
<option value="<c:out value="${category.categoryId}" />"><c:out
value="${category.categoryName}" /></option>
</c:forEach>
</select></td>
<tr>
<td><a
href="addQuestion.lgs?categoryId=2<c:out value="${category.categoryId}"/>">Add
New Question</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Questions under this Category:</td>
<td><c:if test="${model.questions} == null">
<c:out value="no questions found" />
<br>
</c:if> <c:if test="${model.questions} != null">
<c:forEach items="${model.questions}" var="question">
<table>
<tr>
<c:out value="${question.questionDesc}" />
</tr>
</table>
</c:forEach>
</c:if></td>
</tr>
<tr>
<td colspan="2"><input type="submit" /></td>
</tr>
</table>
</form>
regards,
phani.Hi Rahul,
I followed the link what you have mentioned and i need clarification in regarding this....
function getResponseAction(){
// Verifying State & Status
if(verifyReadyState(xmlhttp) == true){
// Building a DOM parser from Response Object
var response = xmlhttp.responseXML.documentElement
// Deleting all the Present Elements in the Drop-Down Box
drRemove()
// Checking for the Root Node Tag
var x = response.getElementsByTagName("option")
var val;
var tex;
var optn;
for(var i = 0;i < x.length; i++){
optn = document.createElement("OPTION")
var er
// Checking for the tag which holds the value of the Drop-Down combo element
val = x.getElementsByTagName("val")
try{
// Assigning the value to a Drop-Down Set Element
optn.value = val[0].firstChild.data
} catch(er){
// Checking for the tag which holds the Text of the Drop-Down combo element
tex = x[i].getElementsByTagName("text")
try{
// Assigning the Text to a Drop-Down Set Element
optn.text = tex[0].firstChild.data
} catch(er){
// Adding the Set Element to the Drop-Down
document.questionForm.category.options.add(optn)
but in my springframe work i have the controller like this where i am putting category object in the context and i am retrieving this in my listQuestions.jsp like this
<tr>
<td>Topics:</td>
<td><select name="topic" onchange="populateCombo(this.value)">
<c:forEach items="${model.topics}" var="topic">
<option value="<c:out value="${topic.topicId}" />"><c:out
value="${topic.topicName}" /></option>
</c:forEach>
</select></td>
<td>Categories:</td>
<td><select name="category">
<c:forEach items="${model.categories}" var="category">
<option value="<c:out value="${category.categoryId}" />"><c:out
value="${category.categoryName}" /></option>
</c:forEach>
</select></td>
<tr>
package com.lgsglobal.lgsexam.spring.controllers;
import java.util.HashMap;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
import com.lgsglobal.lgsexam.dao.CategoryDAO;
import com.lgsglobal.lgsexam.dao.QuestionDAO;
import com.lgsglobal.lgsexam.dao.TopicDAO;
import com.lgsglobal.lgsexam.hibernate.pojos.Category;
import com.lgsglobal.lgsexam.hibernate.pojos.Topic;
public class ListQuestionsController implements Controller {
private TopicDAO topicDAO = null;
public void setTopicDAO(TopicDAO topicDAO) {
this.topicDAO = topicDAO;
public TopicDAO getTopicDAO() {
return this.topicDAO;
private QuestionDAO questionDAO = null;
public void setQuestionDAO(QuestionDAO questionDAO) {
this.questionDAO = questionDAO;
public QuestionDAO getQuestionDAO() {
return this.questionDAO;
private CategoryDAO categoryDAO = null;
public void setCategoryDAO(CategoryDAO categoryDAO) {
this.categoryDAO = categoryDAO;
public CategoryDAO getCategoryDAO() {
return this.categoryDAO;
public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception {
HashMap mymodel = new HashMap();
List topics = topicDAO.getTopics();
mymodel.put("topics", topics);
if (request.getParameter("topic") != null) {
System.out.println("in topics condition to retrieve questions");
int topicId = Integer.parseInt(request.getParameter("topic"));
Topic topic = topicDAO.getTopic(topicId);
List categories = categoryDAO.getCategories(topic);
mymodel.put("categories", categories);
System.out.println("exiting topics condition to retrieve questions");
if (request.getParameter("category")!= null) {
System.out.println("in category condition to retrieve questions");
int categoryId = Integer.parseInt(request.getParameter("category"));
Category category = categoryDAO.getCategory(categoryId);
List questions = questionDAO.getQuestions(category);
mymodel.put("questions", questions);
return new ModelAndView("listQuestions", "model", mymodel);
so here my issue is like how i can populate categories in the category(dependent combo). so please let me know the solution.
awaiting for reply. for any furthere info please let me know....
regards,
Phani.K -
Create PO with the check box of free item selected automaticly
Hi all,
We would like to create PO's with a normal position and a second position which is free.
Is there a possibility to have a special position type for free goods?
We don't want to check this checkbox every time we create a PO...
Thanks,
Thomashi,
Indicator is not possible to get based on the position in the PO..
You can get the indicator defaulted via maintaining the indicator in MMR and then considering the same material while maintaining the PO.
Regards
Priyanka.P
Maybe you are looking for
-
Can't find newest backup - restoring TM backup from TC to MBP with new HD
So I bought an SSD for my MacBook Pro and am excited to get it in there, but I'm very particular about my settings, apps, data, and even my Chrome session (many tabs worth) going back to exactly as I left it when I first boot up with that new SSD. I
-
In FrameMaker, when I try to save a FrameMaker file as a PDF file, I get the following message: "FrameMaker could not find Adobe PDF printer instance, which must be installed to execute "Save as PDF" command". I have a sinking feeling that I deleted
-
Linking source text property in AE CS6 to external text document
Hi, I would like to load text from an external .txt file into the Source Text property. I've seen multiple ways to do this around the web, but it seems like it's changed in CS6. (All the examples I've found are for CS4 or CS5.) I'm on a macbook pro.
-
Using XFA javascript to refer to Data Connection data
Is it possible to use XFA Javascript to refer to Data Connection data, without referring first to a field which is bound to a Data Connection. The aim of this is to track changes of certain fields by comparing a fields "newText" to the Data Connectio
-
I cannot open my Mail (Ver. 4.5)
I am running OS 10.6.8 and just ran Software Update and since then I can no longer open my mail. There was one suggestion in the support section here, but it did not work. Not sure exactly what it said at this moment but at the time I read it I did