Reset radiobutton list when check box unchecked
I have a static PDF registration form that I am working on using LiveCycle Designer 8.2. I would like to learn how to have a radiobutton list reset when a particular check box is unchecked.
When registering for the event, users have the option of attending 1 of the 4 optional afternoon workshop sessions. I have successfully made the workshop radiobuttons hidden until the check box is checked using the following code:
(check box is named "Reg4" -- this is where they say "yes" I'm going to attend 1 of the 4 workshops,
radiobutton list of the 4 workshops is named "RadioButtonList3")
topmostSubform.Page1.Reg4::change - (JavaScript, client)
if (this.rawValue == "0") {
this.resolveNode("RadioButtonList3").presence = "hidden";
When the user unchecks the "Reg4" checkbox after they have selected 1 of the 4 workshops, that radiobutton is still checked.
What I'm looking for is to have the radiobutton list reset (or again hidden) when the Reg4 button is unchecked (after previously being checked).
I hope my description is clear. Is this possible?
Thank you again, Jono, for your reply. I was worried that the Static PDF was the trouble but I just couldn't take no for an answer!
If you're willing, I'd be happy to send you my file but am unable to post publicly.
In an earlier version the RadioButtonList3 is hidden when first viewing the file. It was done using FormCalc. (I know you said don't mix the languages but, hey, it worked!) Also, I found a post you had last year in the discussion "Prompt User to click checkbox (radio button)" where you described a message box using Java. I snagged that and put it on the enter event of the Reg4 field.
When I preview the PDF, this is what I now have:
Upon first view, RadioButtonList3 is hidden and am unable to select (perfect)
When I check the Reg4 box, I get the "You will be registered for a..." warning message (perfect)
I can now make a selection in the RadioButtonList3 (perfect)
If I uncheck the Reg4 box without making a selection on RadioButtonList3, the RadioButtonList3 again hides (perfect)
If I check the Reg4, then make a selection on RadioButtonList3, and then uncheck the Reg4 box, the RadioButtonList3 is reset (perfect)
BUT the RadioButtonList3 is still visible and a selection can now be made (not perfect because the Reg4 box is now unchecked and the user will only be registered for the event if Reg4 is checked)
#1 RadioButtonList3 will hide only if it has not been selected and reset first.
#2 The warning message only appears the first time Reg4 is checked.
These 2 items somehow seem related. Is there something that tells it "use this code when you first open the document but act differently once you've started checking boxes" so it only acts as I intend on the first go-around?
Here's all of my code:
topmostSubform.Page1.RadioButtonList3::calculate - (FormCalc, client)
if (Reg4 == "0") then
RadioButtonList3.access = "readOnly"
else
RadioButtonList3.access = "open"
endif
topmostSubform.Page1.Reg4::change - (JavaScript, client)
if (this.rawValue == 1) {
RadioButtonList3.presence = "visible";
else {
RadioButtonList3.rawValue = "";
RadioButtonList3.presence = "hidden";
topmostSubform.Page1.Reg4::enter - (JavaScript, client)
if (RadioButtonList3.rawValue == "") {
xfa.host.messageBox("You will be registered for an Optional Workshop ONLY if this box is checked. Don't forget to tell us which workshop you will be attending.");
this.rawValue == null;
So sorry for the lengthy post. I'm open to any ideas that anyone may have.
This certainly is a learning experience!
Similar Messages
-
How can I add categories to drop-down lists or check-boxes?
hello can I use sub categories or group items by labels when using drop-down lists or check-boxes?
You can't include sub-menus in a drop-down. What is possible, though, is to populate another drop-down based on the selection made in the first one, or use a pop-up menu. Both things require a script, though.
-
Regarding list having Check Boxes
Hello All,
I have a doubt regarding list having check boxes.
I have a table having five values in rows.How to display that list having those 5 values along with check boxes.
And i need to select only one particular check box.
Please reply as soon as possiblehi there,
check this code.
REPORT ZP5 no standard page heading.
tables mara.
*data: mark1 type c.
data: begin of itab occurs 0,
mark1(1),
matnr like mara-matnr,
werks like marc-werks,
end of itab.
select-options :so_matnr for mara-matnr.
start-of-selection.
select matnr
werks
from marc
into corresponding fields of table itab
up to 10 rows
where matnr in so_matnr
order by matnr .
loop at itab.
write:/ itab-mark1 as checkbox,
itab-matnr,
itab-werks.
endloop.
regards,
vikky. -
Drop-down list of check-box options with header.
Okay, I'm not sure if this is actually possible but I shall ask anyway. Partially because I have limited FP real estate and also because I think this is relatively easy method for the user to use, I have come up with the following idea:
I want something that looks similar to a menu ring when not selected, displaying the text 'Plots'. Then, when it is clicked a list/menu opens downwards (as opposed to the default operation of menu rings). In this list/menu will be an element for each plot that is displayed on an XY Graph. Each element will contain a check-box (control) and a string (indicator). The strings will each display their respective plot name. The user can then click on the list/menu/thing to show the elements for the plots, and can check or uncheck however many they wish. The idea is that whichever plots are checked will be the ones displayed on the XY Graph.
Firstly, have I explained this well enough, and secondly, is it possible?
Thank you.
James
Never say "Oops." Always say "Ah, interesting!"
Solved!
Go to Solution.Just to make sure I wasn't leading you down the garden path, I messed around a little and came up with the following two vi's (LV 8.5)
Load Custom Ring Main.vi, run it, and try selecting the ring list.
Hope this helps!
Thoric (CLA, CLED, CTD and LabVIEW Champion)
Attachments:
Custom Ring Main.vi 24 KB
custom_ring_subvi.vi 37 KB -
Add Row in detail table when check box is checked on a master report table
Hi,
How could I detect the click on the check box within a Report and then insert a row in a detail table?
Many thanks for your help
jkoHi Yogesh,
That is all handled by the cloneRows() function described in that thread.
In that function, we first insert a new row:
var wNew = t.insertRow(ri + 1);ri + 1 = current row + 1 and tells javascript where to add the new row (that is, underneath the current one)
Then, we loop through all of the cells on the current row and copy its cells into the new row:
var c;
var newCell;
var oldCells = w.getElementsByTagName("TD");
for (c = 0; c < oldCells.length; c++)
newCell = wNew.insertCell(c);
newCell.className = oldCells[c].className;
newCell.innerHTML = oldCells[c].innerHTML;
}Next, we search for all INPUT items on the new row and clear the values:
var inputs = wNew.getElementsByTagName("INPUT");
var j;
for (j = 0; j < inputs.length; j++)
inputs[j].value = "";
}And, finally, we call the updateInputs() function to rename all of the items on the page. Apex expects all items to have unique "f01_nnnn" etc names, adding in a new row upsets this, so we need to reset them:
function pad(n)
var s = '0000' + n;
return s.substr(s.length-4);
function updateFields(f)
var fields = document.getElementsByName(f);
var j;
if (fields.length > 0)
for (j = 0; j < fields.length; j++)
fields[j].id = f + "_" + pad(j+1);
function updateInputs()
updateFields("f01");
updateFields("f02");
updateFields("f03");
updateFields("f04");
}without doing that, the data may get lost when the page is re-rendered.
This is all called from a new Derived Column on the report. This column's HTML Expression is:
<a href="#" onclick="javascript:cloneRow(this)"><img src="#IMAGE_PREFIX#FNDADD11.gif"></a>which generates the + symbols which, when clicked, run the cloneRow() function
Andy -
I need to identify a series of single-response checkbox variables and display the ones selected (as a group) in a text field in an appended (comma, space) format. Last week, you provided a great little script for a similar need using List Box (multiple response) variables. This time I need to know how to formally identify the checkbox variables and, I presume, use a similar script to display the results in a comma, space format.
You've been of great help.
ThanksHere's the script adapted to this situation. It assumes there are ten check boxes named cb1, cb1, cb2, ...cb10.
// Custom Calculate script for text field
(function () {
// Initialize the string
var v, s = "";
// Loop through the check boxes to build up a string
for (var i = 1; i < 11; i++) {
// Get the value of the current check box
v = getField("cb" + i).value;
if (v !== "Off") {
if (s) s += ", "; // Add a comma and a space if needed
s += v; // Add the selected value
// Set this field value to the string
event.value = s;
You'll have to change the field name and starting/ending numbers to match your form. -
Row is not deleted when check box is selected urgent please
my problem is, i am creating number of rows dynamicaly and storing the values in the database. I do have one delete check box. if the user checked that box that row should be deleted. I am using array to return the check box values. It is working fine when there is multiple rows.. suppose if i do have only one row and trying to delete that row i am getting an exception. Please help me to solve this issue, here ismy jsp
<%@page language="java" import="java.lang.*, java.sql.*, java.io.*,
java.util.*"%>
<%@ page import="DatabaseConnection"%>
<%@ page import="AdjustmentsBean"%>
<%@ page import="AdjustmentTransactionInfo"%>
<%@ page import="CustomerLocationInfo"%>
<%@ page import="EmersonGlobalConstants"%>
<%@ page import="CallPLSQLFunc"%>
<%@include file="Security.jsp" %>
<%
AdjustmentsBean adjustments = new AdjustmentsBean();
String userName=(String)session.getAttribute("user_name");
String divisionCode=(String)session.getAttribute("division_code");
String divisionName=(String)session.getAttribute("division_code_name");
if(userName==null){userName="";}
if(divisionCode==null){divisionCode="";}
if(divisionName==null){divisionName="";}
GregorianCalendar calendar = (GregorianCalendar)Calendar.getInstance();
CallPLSQLFunc callPLSQLFunc = new CallPLSQLFunc();
Vector months = callPLSQLFunc.getMonths(divisionCode);
String cMonth = callPLSQLFunc.getCurrentMonth(divisionCode);
System.out.println("%%%%%%%%%" +months);
//int mm = calendar.get(Calendar.MONTH) + 1;
//int yyyy = calendar.get(Calendar.YEAR);
if(months ==null){
months=new Vector();
int mmst=0;
int yyst=0;
if(months.size()>=1){
//mmst=Integer.parseInt(new String(((String)months.get(0)).charAt(0)));
mmst=Integer.parseInt(String.valueOf(((String)months.get(0)).charAt(0)));
yyst=Integer.parseInt(((String)months.get(0)).substring(3,6));
StringTokenizer token1 = new StringTokenizer(cMonth,"-");
yyst=Integer.parseInt(token1.nextToken());
mmst=Integer.parseInt(token1.nextToken());
int ddst = Integer.parseInt(token1.nextToken());
String currentDate= (mmst<10?"0"+mmst:mmst+"") + "/" + yyst;
System.out.println("The current date is" + currentDate);
String slectedMonth = request.getParameter("selectedMonth");
String selectedDate=currentDate;
if(slectedMonth != null && slectedMonth.trim().length()>0){
selectedDate=slectedMonth;
boolean modifyAllowed=false;
if(selectedDate.equalsIgnoreCase(currentDate)){
modifyAllowed=true;
String admin=(String)session.getAttribute("admin");
if(admin==null){admin="false";}
if(admin.equalsIgnoreCase("true") ){
modifyAllowed=true;
%>
<%
Vector transactions = adjustments.getTransactionsOfMonth(selectedDate,divisionCode);
Vector customers = adjustments.getAllCustomers();
System.out.println("customers : "+customers.size());
%>
<html>
<head>
<script>
var modifyAllowed;
if(<%=modifyAllowed%> == true){
modifyAllowed = '';
}else{
modifyAllowed = 'disabled';
var EAS_Cust_Loc_Num_Key = new Array(<%=customers.size()%>);
var EAS_Cust_Num_Key = new Array(<%=customers.size()%>);
var EAS_Cust_Num = new Array(<%=customers.size()%>);
var EAS_Cust_Name = new Array(<%=customers.size()%>);
var customerWiseLocationNumKey = new Array(<%=customers.size()%>);
var customerWiseLocationName = new Array(<%=customers.size()%>);
<%
for(int i=0;i<customers.size();i++){
CustomerLocationInfo cl = (CustomerLocationInfo)customers.get(i);
%>
EAS_Cust_Loc_Num_Key[<%=i%>] = "<%=cl.getEAS_Cust_Loc_Num_Key()%>";
EAS_Cust_Num_Key[<%=i%>] = "<%=cl.getEAS_Cust_Num_Key()%>";
EAS_Cust_Num[<%=i%>] = "<%=cl.getEAS_Cust_Num()%>";
EAS_Cust_Name[<%=i%>] = "<%=cl.getEAS_Cust_Name()%>";
var locationNumKey = new Array(<%=cl.getLocations().size()%>);
var locationName = new Array(<%=cl.getLocations().size()%>);
<%
int j=0;
Enumeration enum = cl.getLocations().keys();
while(enum.hasMoreElements()){
String s = (String)enum.nextElement();
String name = (String)cl.getLocations().get(s);
%>
locationNumKey[<%=j%>]="<%=s%>";
locationName[<%=j%>]="<%=name%>";
<%
j=j+1;
%>
customerWiseLocationNumKey[<%=i%>] = locationNumKey;
customerWiseLocationName[<%=i%>] = locationName;
<%
%>
function changeMonth(){
window.document.adjustmentForm.action="Adjustments.jsp";
adjustmentForm.submit();
function populateLocation(id){
var table = document.getElementById('myTable');
var rows = table.rows.length-2;
var theForm = document.forms[0];
var wRow = theForm["location"];
var wCustRow = theForm["customer"];
var len;
var locobj ;
var custobj ;
if(rows ==1){
locobj =wRow;
}else{
locobj =wRow[id];
if(rows ==1){
custobj =wCustRow;
}else{
custobj =wCustRow[id];
len = locobj.options.length;
locobj.selectedIndex=0;
for(z=0;z<len;++z){
locobj.options[z] = null;
locobj.options.length=0;
locobj.options[0] = new Option("Select Any Location");
var cIndex = custobj.selectedIndex;
if(cIndex !=0){
for(i=1;i<=customerWiseLocationName[cIndex-1].length;i++){
locobj.options = new Option(customerWiseLocationName[cIndex-1][i-1],customerWiseLocationNumKey[cIndex-1][i-1]);
function addRow(id){
var table = document.getElementById(id);
var sHTML = new Array() ;
var cus = "<select name=customer onChange='javascript:populateLocation("+(table.rows.length-2)+")'"+modifyAllowed+"><OPTION VALUE=''>Select Any Customer</OPTION>";
var options;
for(i=0;i<EAS_Cust_Num.length;i++){
options = options+"<OPTION VALUE='" + EAS_Cust_Num +"'>" + EAS_Cust_Name + "</OPTION>";
cus=cus+options+"</select>";
sHTML[0] = "<input type=checkbox name=chk "+modifyAllowed+" onClick=changedisable("+(table.rows.length-2)+")><input type=hidden name=adid value='' ><input type=hidden name=isdelete value='false'>";
sHTML[1] = cus;
sHTML[2] = "<select name='location'"+modifyAllowed+"><OPTION VALUE=''>Select Any Location</OPTION>";
sHTML[3] = "<input type=text size=10 maxlength=40 name=sku"+modifyAllowed+"> <input type=button value=Search onClick=window.open('SearchSKU.jsp?cnt="+(table.rows.length-2)+"','SearchSKU','width=350,height=350,top=150,left=150,scrollbars=yes')>";
sHTML[6] = "<input type=hidden name=shipnotbilled "+modifyAllowed+" onClick=changeisshipnotbilled("+(table.rows.length-2)+")><input type=hidden name=isshipnotbilled value='false'>";
sHTML[4] = "<input type=text size=10 maxlength=40 name=units "+modifyAllowed+">";
sHTML[5] = "<input type=text size=10 maxlength=40 name=amount "+modifyAllowed+">";
var newRow = table.insertRow(-1);
var sHTMLIndex = sHTML.length ;
for(i=0;i<sHTMLIndex;i++) {
var newCellSelect = newRow.insertCell(-1);
newCellSelect.innerHTML = sHTML;
function validate(){
var table = document.getElementById('myTable');
var theForm = document.forms[0];
var wRow = theForm["amount"];
var custRow = theForm["customer"];
var locRow = theForm["location"];
var quantityRow = theForm["units"];
var count = table.rows.length;
var rows = table.rows.length-2;
var obj;
if(rows==1){ //only one row..
if(wRow.value==""){
alert("Amount field is mandatory. Please fill in amount");
return false;
if(custRow.selectedIndex==0){
alert("Customer is mandatory. Please select the customer");
return false;
if(locRow.selectedIndex==0){
alert("Location is mandatory. Please select the location");
return false;
if(! isAmount(wRow.value) ){
alert("Amount is numeric. Please enter numeric value for amount");
return false;
if(!isQuantity(quantityRow.value)){
alert("Quantity is numeric. Please enter numeric value for quantity");
return false;
}else{ //this means more than one rows..
for(i=0;i<count-2;i++){
if(wRow.value==""){
alert("Amount field is mandatory. Please fill in amount for transaction no "+(i+1));
return false;
if(wRow.value== 0){
alert("Please fill non zero value for Amount "+(i+1));
return false;
if(custRow.selectedIndex==0){
alert("Customer is mandatory. Please select the customer for transaction no "+(i+1));
return false;
if(locRow.selectedIndex==0){
alert("Location is mandatory. Please select the location for transaction no "+(i+1));
return false;
if(! isAmount(wRow.value) ){
alert("Amount is numeric. Please enter numeric value for amount of transaction no "+(i+1));
return false;
if(!isQuantity(quantityRow.value)){
alert("Quantity is numeric. Please enter numeric value for quantity of transaction no "+(i+1));
return false;
if(quantityRow.value== 0){
alert("Please fill non zero value for Units "+(i+1));
return false;
return true;
function isQuantity(value){
for (k=0;k<value.length;k++){
if(k==0){
if(!(value.charAt(k)>=0 && value.charAt(k)<=9) ){
if(value.charAt(k)!='-'){
break;
}else{
if(!(value.charAt(k)>=0 && value.charAt(k)<=9)){
break;
if(k == value.length){
return true;
}else{
return false;
function isAmount(value){
for (k=0;k<value.length;k++){
if(k==0){
if(!(value.charAt(k)>=0 && value.charAt(k)<=9) ){
if(value.charAt(k)!='-'){
break;
}else{
if((!(value.charAt(k)>=0 && value.charAt(k)<=9)) ){
if(value.charAt(k) !='.'){
break;
if(k == value.length){
return true;
}else{
return false;
function changedisable(index){
if(document.adjustmentForm.chk[index].checked){
document.adjustmentForm.isdelete[index].value='true';
}else{
document.adjustmentForm.isdelete[index].value='false';
function changeisshipnotbilled(index){
if(document.adjustmentForm.shipnotbilled[index].checked){
document.adjustmentForm.isshipnotbilled[index].value='true';
}else{
document.adjustmentForm.isshipnotbilled[index].value='false';
function backtoHome(){
window.document.adjustmentForm.action="Welcome.jsp";
adjustmentForm.submit();
function setData(cnt,num){
var table = document.getElementById('myTable');
var rows = table.rows.length-2;
if(rows==1){
window.document.adjustmentForm.sku.value=num;
}else{
window.document.adjustmentForm.sku[cnt].value=num;
</script>
<link rel="stylesheet" type="text/css" href="main.css" />
<%= EmersonGlobalConstants.TITLE %>
</head>
<body class="trAppId1" alink="blue" vlink="blue" link="blue">
<form name="adjustmentForm" method="get" action="AdjustmentServlet"
target="display">
<center>
<br>
Manual Sales Application
<br>User Name: <%=userName%>, Division Code: <%=divisionCode%>,
Division Name: <%=divisionName%>
<br>
<br><br><br>
<b>Date: </b>
<Select name="selectedMonth" onChange="javascript:return changeMonth();">
<%
for(int i=0;i<months.size();i++){
String mon = (String)months.get(i);
System.out.println("mon *********** : "+mon);
//mmst=Integer.parseInt(new String(((String)months.get(i)).charAt(0)));
mmst=Integer.parseInt(String.valueOf(((String)months.get(i)).charAt(0)));
yyst=Integer.parseInt(((String)months.get(i)).substring(3,6));
out.println("<option value='"+ (mmst<10?"0"+mmst:mmst+"") + "/" + yyst+"' "+(selectedDate.equalsIgnoreCase((mmst<10?"0"+mmst:mmst+"") + "/" + yyst)?"selected":"") +">"+getMonth(mmst) + ", " + yyst+"</option>");
for(int i=0;i<months.size();i++){
String mon = (String)months.get(i);
StringTokenizer token = new StringTokenizer(mon,"/");
String mmm= token.nextToken();
String yyy= token.nextToken();
System.out.println("mon *********** : "+mon);
mmst=Integer.parseInt(mmm);
yyst=Integer.parseInt(yyy);
System.out.println("selectedDate**** "+selectedDate);
out.println("<option value='"+ (mmst<10?"0"+mmst:mmst+"") + "/" + yyst+"' "+(selectedDate.equalsIgnoreCase((mmst<10?"0"+mmst:mmst+"") + "/" + yyst)?"selected":"") +">"+getMonth(mmst) + ", " + yyst+"</option>");
%>
</select>
<br><br>
</center>
<table id="myTable" class="tableForm" border="1" cellpadding="1" cellspacing="1" width="100%" align="center">
<tr class="trFormHead"><td colspan="7"> Adjustment Transactions</td></tr>
<tr>
<td width = 2%><b>Delete</b></td>
<td width = 25% align=center><b>Customer<font color=red> *</font></td>
<td width = 25% align=center><b>Location<font color=red> *</font></td>
<td width = 20% align=center><b>SKU<font color=red> *</font></td>
<!-- <td width = 5% align=center><b>SNB</td> -->
<td width = 9% align=center><b>Units<font color=red> *</font></td>
<td width = 9% align=center><b>Amount<font color=red> *</font></td>
</tr>
<%
int index=0;
AdjustmentTransactionInfo transacrionInfo;
for(;index<transactions.size();index++){
transacrionInfo = (AdjustmentTransactionInfo)transactions.get(index);
%>
<input type=hidden name=adid value='<%=transacrionInfo.getAdjustmentId()%>' >
<TR>
<td><input type=checkbox name=chk <%=modifyAllowed?"":"disabled"%> onClick=changedisable(<%=index%>) >
<input type=hidden name=isdelete value='false'></td>
<td >
<select name=customer <%=modifyAllowed?"":"disabled"%> onChange='javascript:populateLocation(<%=index%>)' >
<OPTION VALUE="">Select Any Customer</OPTION>
<%
for(int i=0;i<customers.size();i++){
CustomerLocationInfo cl =(CustomerLocationInfo)customers.get(i);
//this is done considering that EASCustLocNum of transaction is same as EAS_Cust_Loc_Num_Key of customer table.
String selected = cl.getLocations().containsKey(transacrionInfo.getEASCustLocNum())?"selected":"";
out.println ("<OPTION VALUE='" + cl.getEAS_Cust_Num() + "'"+selected+">" + cl.getEAS_Cust_Name() + "</OPTION>");
%>
</select>
</td>
<td>
<select name="location" <%=modifyAllowed?"":"disabled"%> >
<OPTION VALUE="">Select Any Location</OPTION>
<%
for(int i=0;i<customers.size();i++){
CustomerLocationInfo cl = (CustomerLocationInfo)customers.get(i);
if(cl.getLocations().containsKey(transacrionInfo.getEASCustLocNum())){
Hashtable locations = cl.getLocations();
Enumeration enum = locations.keys();
while(enum.hasMoreElements()){
String key =(String)enum.nextElement();
out.println ("<OPTION VALUE='" + key +"'"+(key.equalsIgnoreCase(transacrionInfo.getEASCustLocNum())?"selected":"")+">"+ locations.get(key) + "</OPTION>");
%>
</select>
</td>
<td>
<script>
function openURL(URL,windowName){
</script>
<input type=text size=10 maxlength=40 name=sku value="<%=transacrionInfo.getProductionSKUNum()%>"<%=modifyAllowed?"":"disabled"%> >
<input type=button value="Search"onclick="javascript:window.open('SearchSKU.jsp?cnt=<%=index%>', 'SearchSKU', 'width=350,height=350,top=150,left=150,scrollbars=yes');">
</td>
<!--
<td>
<input type="checkbox" name="shipnotbilled" <%=transacrionInfo.getShipNotBilled()?"checked":""%><%=modifyAllowed?"":"disabled"%> onClick=changeisshipnotbilled(<%=index%>)><input type=hidden name=isshipnotbilled value='<%=transacrionInfo.getShipNotBilled()?"true":"false"%>'>
</td>
-->
<input type=hidden name="shipnotbilled" <%=transacrionInfo.getShipNotBilled()?"checked":""%> <%=modifyAllowed?"":"disabled"%> onClick=changeisshipnotbilled(<%=index%>) ><input type=hidden name=isshipnotbilled value='<%=transacrionInfo.getShipNotBilled()?"true":"false"%>'>
<td>
<input type="text" size="10" name="units" value="<%=transacrionInfo.getAdjustmentQty()%>"<%=modifyAllowed?"":"disabled"%> >
</td>
<td>
<input type="text" size="10" name="amount" value="<%=transacrionInfo.getAdjustmentAmt()%>" <%=modifyAllowed?"":"disabled"%> >
</td>
</tr>
<%
/*if(transactions== null || transactions.size()==0){
out.println ("<tr><td></td><td colspan=6 align =
center><b> Transactions not available</b></td></tr>");
%>
</Table>
<br>
<br>
<%
if(modifyAllowed){
%>
<b>AddTransaction</b>
<br><b>Transactions marked will be deleted on submit</b>
<br>
<b>Fields marked with <font color=red>*</font> are mandatory.</b>
<%
%>
<center>
<br>
<%
if(modifyAllowed){
%>
<input type=submit value="Submit Form!" onClick='javascript:return validate()'>
<%
}else{
%>
<input type=button value="Back to Home Page" onClick='javascript:backtoHome()'>
<%
%>
</center>
</form>
<br><hr>
</body>
</html>
<%!
String getMonth(int month){
switch(month){
case 1:
return "JAN";
case 2:
return "FEB";
case 3:
return "MAR";
case 4:
return "APR";
case 5:
return "MAY";
case 6:
return "JUN";
case 7:
return "JUL";
case 8:
return "AUG";
case 9:
return "SEP";
case 10:
return "OCT";
case 11:
return "NOV";
case 12:
return "DEC";
return "JAN";
%>I haven't read your code, but can make a guess at what's going wrong. Checkboxes do behave in a weird manner depending upon whether you have selected one or many.
Assuming this is the statement where you are generating the checkbox :
<input type="checkbox" name="checkBoxName" value="<%= someValue %>">
What you could do is read the checked checkBoxes in an array :
String[] values = request.getParameterValues("checkBoxName");
int sizeOfValues = values.length;
Then use the sizeOfValues to perform your delete action :
if (sizeOfValues==1)
performDelete();
else
for (int i=0; i<sizeOfValues(); i++)
performDelete();
Hope this technique works. -
Set the value of items when check box is checked
Hi,
My requirement is when we click a check box it should set the value of an item as 111111 and clear the values of two items in an apex page.
I used java script onClick event to set those items using document.getElementByID('Item_Name')='';
One of the item which needs to be cleared is a conditonal type.
When the condional item present, java script works fine. But if it is not present,
code works but it shows "error on page" for few seconds.
Is it possible to clear the item, only when the item is present in the page.
Thanks,
RaviHi,
Yes e.g. like
if($x("ITEM_NAME")){
$s("ITEM_NAME", "");
}Regards,
Jari -
How to update field when check box checked
Hi All,
I am using oracle Forms 10g,
I have a block with 20 fields.So first 10 Fields are not updatable and remaining are Editable. So the user will enter the Data and changes the data.And check the Check box and save the data.
Inside the save button i have written the update code.
When the user Edit two or three records and click three Check box and click the save button only one record is getting entred in my custom table.
This is my code please correct me where i went worng.
This is my code inside my button
declare
Begin
If :ASSEMBLIES_BLOCK.CHECK_IN_OUT='Y' THEN
IF SHOW_ALERT ('UPDATE_ALERT') = alert_button1 THEN
LOOP
XXTLX_PO_LOGOSTICS.XXTLX_PO_LOGOSTICS_UPDATE;
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
NEXT_RECORD;
END LOOP;
STANDARD.COMMIT;
fnd_message.set_string ('Transaction Saved Successfully');
fnd_message.show;
ELse
NULL;
END If;
END IF;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
WHEN OTHERS
THEN
NULL;
END;
I have write a procedure in program unit.
XXTLX_PO_LOGOSTICS.XXTLX_PO_LOGOSTICS_UPDATE
Assemblies block is my current block that user enter the data and click the check box and save the data.
Update XXTLX_PO_ASSEMBLIES set CASE_NO=nvl(:assemblies_block.CASE_NO,Null),
PACKAGE_TYPE=nvl(:assemblies_block.PACKAGE_TYPE,null),
PACKAGE_QTY=nvl(:assemblies_block.PACKAGE_QTY,Null),
GROSS_WT=nvl(:assemblies_block.GROSS_WEIGHT,Null),
OPI_DATE=nvl(:assemblies_block.OPI_DATE,Null)
Where ponum=:DETAIL_BLOCK.PO_NUMBER
AND PO_LINE_NUM=:DETAIL_BLOCK.LINE_NUM
AND BOM_NO=:assemblies_block.BOM_NO;
So when we click the multiple check box and save the data only one data is entering.
Thanks & Regards
SrikkanthI guess I don't understand.
>
... my requirement is only the checked fields need to get updated. If in a block there are 10 records means ill update only the 3rd and 4th record and then click the check box.. and then ill click the save button.
>
Is this block a database block or a non-database block? If it is a database block then Oracle can handle updates to that block for you because if keeps tabs if a record was updated or not and you wouldn't need to do an UPDATE statement.
If it is a non-database block, and you are looping through each record and only updating the items that have checkboxes next to them you would still have to go to the first record then step through each record and see if it needs to be updated. I am just guessing here because I don't think I have a good grasp on what you are doing, but you could change your XXTLX_PO_LOGOSTICS.XXTLX_PO_LOGISTICS_UPDATE package to only update the items that have checkboxes next to them, by checking each checkbox:
-- Check Case No
if nvl(:assemblies_block.chase_no_check,'N') = 'Y' then
update xxtlx_po_assemblies
set case_no = :assemblies_block.case_no
where ponum = :detail_block.po_number
and po_line_num = :detail_block.line_num
and bom_no = :assemblies_block.bom_no;
end if;
-- Check Package Type
if nvl(:assemblies_block.package_type_check,'N') = 'Y' then
update xxtlx_po_assemblies
set package_type = :assemblies_block.package_type
where ponum = :detail_block.po_number
and po_line_num = :detail_block.line_num
and bom_no = :assemblies_block.bom_no;
end if;
-- Check Package Qty
. -
Dynamic list of check boxes in forms 6i
hi there, i'm trying to build a form which based on the contents of a table shows a number of check boxes, i'm having trouble figuring out how to go about i though, any ideas???
the 3 builtin you should use are :
create_group_from query.
Populate_group
Populate_list
Check out the online help on these routines . -
Message Check Box, Unchecked Value
Hi,
I want to set this message checkbox item to <null> so I didn't put any value in the Unchecked Value. However, when I returned to the self-service page, and unchecked the checkbox, I'm getting 'N' instead of <null>.
How do I set the Unchecked value to null?? Is it possible??
By the way, this checkbox is an attribute that has a value set which only accepts 'Y' for 'Yes' but it is not required so null can be accepted.
Thanks,
N
Edited by: user8427607 on 11/08/2009 21:56Hello,
Thanks for the reply but I have solved it by manipulating my value set. I just included a dummy row that accepts 'N' (unchecked value).
I had to have a NULL unchecked value because this certain field is not mandatory and I don't really want to display the value 'N' or 'No'. It should only be Yes or Null.
Thanks anyway!
N -
When I open my iCloud browser it looks different than "normal." It shows the list with check boxes, not slider on-off buttons. It dos not show a "storage and backup" button so I cannot set up my backup. What is wrong?
If see something like the image below it's because you are looking at the iCloud settings on your Mac, not on an iOS device (which has sliders). Storage & Backup isn't in the Mac settings because you cannot back up your Mac to iCloud. Only iOS devices can back up to iCloud. On a Mac, you can get information about your iCloud account storage by looking at the green usage bar at the bottom and by clicking the "Manage..." button on the bottom right.
-
When I start firefox, it used to send me directly to my home page, now I have to login and enter password everytime, even when checking box to leave me logged in. Also, its not rememberin ids and passwords for my bookmarked sites.
Make sure that you do not run Firefox in permanent Private Browsing mode.
*https://support.mozilla.org/kb/Private+Browsing
To see all History and Cookie settings, choose:
*Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
*Deselect: [ ] "Always use private browsing mode"
If clearing the cookies doesn't help then it is possible that the file <i>cookies.sqlite</i> that stores the cookies is corrupted.<br />
Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete other present cookie files like <b>cookies.sqlite-journal</b> in the Firefox Profile Folder in case the file cookies.sqlite got corrupted.
*http://kb.mozillazine.org/Cookies
You can also try to update to Firefox 9.0.1 -
How to disable one check box when another is checked
Hi, I'm a first time user.
i am trying to make text fields appar and dissapaer when check boxes are ticked. but only alow one check box to be active at one time.
I am making a simple form in Acrobat pro 9,
I have two check boxes Checkbox1 & Checkbox2.
I have two text fields Textfield1 & Textfield2
i have added actions to checkbox1 & checkbox2 to 'hide or show' the text fields.
Action --> on focus (checkbox1) show/hide field (textfield1) is hide
Action --> on focus (checkbox1) show/hide field (textfield2) is show
oposite
Action --> on focus (checkbox2) show/hide field (textfield2) is hide
Action --> on focus (checkbox2) show/hide field (textfield1) is show
problem 1 - how to disable checkbox1 when checkbox 2 is ticked.
or disable checkbox2 when checkbox1 is ticked.
my other problem is that this action has the same effect for ticking or unticking the checkbox.
thanks in advance to anyone who can help.
can you please write your answer in simple terms. Basically this is the first time i have used acrobat pro so please dont assume any knowledge at all. thansk very much .First, I would experiment with just check boxes and learn their properties and how they can interact.
Have you tried using the same name for 2 check boxes and assign a different "export value" to each check box.
Have you looked at the values a check box or boxes have when checked or un-checked?
Have you looked at how the various actions for a field work? -
I'm trying to create a JList containing a list of check boxes. I've create a vector of check box objects (vCheckBox) and I instantiate the list as follows : list = new JList(vCheckBox). When the JList displays on the screen what I get in the list is the 'toSting' representation of the check box objects. I tried to create a ListCellRenderer that simply recasts the the vector object as a JCheckBox and I get the check boxes in the list but they are all disabled and I can't figure out a way to enable them in the list. I've tried all of the obvious things.
Any thoughts? Thanks!Yes. Actually, i created a 2 column JTable (first column is a boolean, second column is a description). When the boolean is represented by a check box when displayed in the table. I created code so if the user selects the description cell it will select/deselect the coresponding checkbox. It works well and actually looks like a JCheckbox. I was just seeing if the JList implementation would be simplier and require less code.
Maybe you are looking for
-
I have a PC laptop and work desktop PC that I use for Audition to edit podcasts. I have a Mac at home that I want to use for photoshop (and also install it on my work PC, maybe). So that's 3 computers, but each Adobe application will only be on one (
-
Email body appears in very small text on 6 Plus
New iPhone 6 Plus shows email body too small to read when opening an email. It's tiny. I know I can zoom with pinch out or double tap but this is no good for me. Reason for big phone is to see/read content easily and to be more productive (not less)
-
Data entry type in array of clusters
Hi i have 4 column array of cluster X Y Z & Data entry Type X+Y=Z simply I wanna do this when i entry x; data type cell will auto X (not numerical value just "X") when i entry z; data type cell will auto Z Then i can build my algorithm. How can i
-
What do I do when an error messages says apple mobile device failed to start?
I am trying to update my itunes as it is not opening as the last time I updated I forgot to restart. An error messages appears saying apple mobile device failed to start. Please check your have sufficient privileges to start system services. Anyone k
-
Hi All, I am looking for portal performace related documents like performace tuning/performace monitoring overall documents. Please get back to me on the same Thanks in advance Best Regards, PortalUser100