Check box selection

Hi
I have a problem with check box selection.I query from the database and based on the output from the query i prepopulate the check box with a tick mark.But when the user goes again and deselects one of the check box that was ticked and submits the form , it also includes the unchecked box.the following is the code I have.
<%
if (itemStr == 00 ){
%>
<td align="center">
<input type="checkbox" name="build">
</td>
<% }
else{ %>
<td align="center">
<input type="checkbox" name="build1" checked >
</td>
Then in my form I do
String[] ar = request.getParameterValues("build1");
how do i ensure if the user unselects from build1 , it doesnt add that item.
Help Needed
Arn

Notice that this line
request.getParameterValues("build1");
is getting the value of the check box. The "checked" attribute is not the value, just the attribute.
Oddly enough, I just wrote some code to do this today.
First, add this little javascript method to your page.
<SCRIPT language="JavaScript"> <!--  //Hide contents from older browsers
function setHiddenTagFromCheckbox(checkbox, element) {
  if(checkbox.checked) {
    element.value="yes";  
  else {
    element.value="no";  
// End hiding the contents -->
</SCRIPT> 2) Add a hidden input field for each checkbox field.
<input type="HIDDEN" name="prin2signhidden" value = "no">3) Add an onclick handler for the check box
<input type=checkbox name="prin2sign" onclick="setHiddenTagFromCheckbox(document.formname.prin2sign, document.formname.prin2signhidden)">In your servlet check the value of prin2signhidden instead of the checkbox input.
The forum is doing odd things to this source code. Any place you see a > you should actually have a "greater than" sign.

Similar Messages

  • Passing column values to another tab if check box selected in that row

    Hi
    I have the following requirement.
    I have a table that gets populated by a web service. Have added one more field to it which is a check box. Th requirement is that I need to pass the values of column (say id) from each row which has it's check box selected, as input parameters to a web service in another tab.
    example: table has fileds id, name, address,checkbox. If there are 5 rows and the user select 1 and 2 then I need the ids of 1 and 2 to be passed to another tab.
    Is this possible  ........
    Thanks

    Hi
    I just don't want to make multiple selection but pass the values of a column from the selected rows to another tab to be used as input parameters to a web service.
    I want to know how to pass the values(of one filed) of the selected rows across tabs/switches.
    Thanks

  • I have a new MacBook Pro with OS10.8.2 and cannot get Contacts to print a list of addresses with pictures showing.  There is a check box selecting "picture" which has been checked - but no picture.  This worked fine on OS10.7.5.  Problem??

    I have a new MacBook Pro with OS10.8.2 and cannot get Contacts to print a list of addresses with pictures showing.  There is a check box selecting "picture" which has been checked - but no picture.  This worked fine on OS10.7.5.  Problem??

    First, back up all data immediately, as your boot drive might be failing.
    There are a few other possible causes of generalized slow performance that you can rule out easily.
    Reset the System Management Controller.
    If you have many image or video files on the Desktop with preview icons, move them to another folder.
    If applicable, uncheck all boxes in the iCloud preference pane.
    Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
    Check your keychains in Keychain Access for excessively duplicated items.
    If you have more than one user account, you must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long.

  • Check box selection based on name inside a field

    I have a fillable PDF form
    the form has 2 check box selections.  M  or F   (male or female)
    i can get a field to populate with M or F or Male or Female but how can I get a check box to select M or F based on
    what comes into a field ?

    You can use the text-field's custom validation script to edit the check-box, for example:
    if (event.value=="Male") this.getField("CheckBoxMale").checkThisBox(0, true);
    else if (event.value=="Female") this.getField("CheckBoxFemale").checkThisBox(0, true);

  • Check box selection in IP WEB

    Hello everyone
    I am in IP with WEB front end.
    Have an analysis item which I need to run a planning function on that chages a charateristic field which is a status. The user needs to be able to select a subset of rows on which the planning function will be executed.
    Ideally a check box on the row would allow the user to select multiple lines and then execute the planning function changing the status.
    Can someone point me in the right direction?
    Thanks

    Your only option to enable functions to run on selected rows is to find some way to filter the query on those rows. If you cannot find any way to do that you can do a workaround which I have done recently:
    1 - Get a dummy key-figure
    2 - Instruct your users to fill that key figure with the value "1" for the lines they want to process.
    3 - The function (must be a FOX ou Exit) will validade if the user has filled the keyfigure with the value 1 and process that line. If the user didn't fill the keyfigure the function does nothing on that line.
    I know this isn't a perfect solution but it was the best way I could think of. If someone finds a better way I'll be interested too!

  • Check box Select All

    Hi all,
    I have created a Report with
    select EMP_no,
    EMP_name,
    Sal,
    apex_item.checkbox(2,EMP_no) CHK
    from emp
    Order by 1
    where I want have the Select All check box on th etop of the CHK Column for that i used
    <input type="checkbox" onclick="$f_CheckFirstColumn(this)" /> as Heading of the Column
    so when i clicked on Heading Column Chk BOX all chk box in that column selected but if UN chk on one of the Chk box in the Report the TOp heading CHk box has to Be unchk but its happenig wats the Solution for that?
    Regards
    798545
    Edited by: 798545 on Oct 1, 2010 6:35 AM
    Edited by: 798545 on Oct 1, 2010 6:35 AM

    Hi all,
    I have created a Report with
    select EMP_no,
    EMP_name,
    Sal,
    apex_item.checkbox(2,EMP_no) CHK
    from emp
    Order by 1
    where I want have the Select All check box on th etop of the CHK Column for that i used
    <input type="checkbox" onclick="$f_CheckFirstColumn(this)" /> as Heading of the Column
    so when i clicked on Heading Column Chk BOX all chk box in that column selected but if UN chk on one of the Chk box in the Report the TOp heading CHk box has to Be unchk but its happenig wats the Solution for that?
    Regards
    798545
    Edited by: 798545 on Oct 1, 2010 8:28 AM

  • Help requested: How to pass the (check box) selected rows data to other scr

    Hi friends, Here is a situation where I have to pick only those records data which i select by checking the check boxes and carry on to next screen where I have to display them and do some processing on such selected rows of data. Can any one suggest me how to code this. Thanks in advance.

    Hi Subbarao,
    One way is to check if the field is selected by checking if the field value = 'X'.
    If it is a table control we will have to loop and find out which all records are selected..it is notable that the check box field will mostly be of single character and contain 'X' if it is checked and space if not checked
    Based on the structure where the check box is held we may have to implement various logic to retrieve whether the field is checked or not....for instance we can move data to another internal table for which the checkbox is checked and can retrieve it from the next screen
    Pls check,revert and reward if helpful
    Regards
    Byju

  • Acrobat 9 want to change check box selection to a Tick or a X

    I have created a pdf form (from word)
    I used the "form field recognition"
    Everything went ok but the check boxes when selected
    only left a black square dot.
    I would like a X or a Tick. I have read the help file below.
    but nathing I try will get it to work, I must be missing somthing.
    realy need help( step by step) preferably.
    TIA Tony
    ========================
    Set a status
    Select the comment in the Comments list, click the Set Status button , and choose an option.
    The review status appears in the comment along with the name of who set the review status. If another reviewer sets the review status for that comment, both reviewers names and review statuses appear in the Comments list.
    To view a comments history of changes, right-click the note icon, markup, or title bar of a pop-up note, and then choose Properties. Click the Review History tab.
    Flag comments with a check mark
    In the Comments list, click the check box next to a comment so that the check mark icon appears.
    ==============================

    FWIW, the help text you posted does not apply to check box form fields, but rather Comments.
    What you need to do is change the Check Box Style, which can be set to Check, Circle, Cross, Diamond, Square, or Star.
    To do so manually, open the DPF, select "Forms > Add or Edit Fields", select one or more of the check boxes, right-click and select Properties, go to the Options tab, and select the style you want from the Check Box Style drop-down.
    George

  • How to Auto-populate TextField in Acrobat x with a value determined by user check box selection?

    I have a group of 3 Check Boxes for user to select their Work Shift:  The check boxes are set up to be mutually exclusive (same name: "EMP_Shift", different Export Values: Day, Evening, Night).
    Form Field properties name:      EMP_Shift (for all 3 check boxes)
    Acrobat edit panel field names:  EMP_Shift#0, EMPShift#1, EMPShift#2
    Export Values:                         Day, Evening, Night (chose these only because they are descriptive)
    I need to Auto-populate a Text Field named EMP_WorkShift with "Day" if EMP_Shift#0 is selected, "Evening" if EMPShift#1 is selected, or "Night" if EMPShift#2 is selected.
    Is there a script I can use to accomplish this in Acrobat Pro X.

    The simplest is to set up the text field to be calculated using the following custom Calculate script:
    // Get the value of the check box
    var v = getField("EMP_Shift").value;
    // Set this field value
    event.value = v !== "Off" ? v : "";
    You'd normally set the text field to be read-only, but if you want the user to be able to edit the text field, you can instead use the following script in the Mouse Up event of each check box:
    // Get the value of the check box
    var v = event.target.value;
    // Set the value of the text field
    getField("EMP_Workshift").value = v !== "Off" ? v : "";

  • Need to change the LOV field based on checked box selection in OAF page

    Dear ALL,
    I have a requirement as below:
    I have a custom OAF page having a lov  field which is mandatory, a check box and a two text fields.
    So based on LOV value selection i am defaulting two text field value automatically.
    So my requirement is when user selects the check box automatically the LOV field should be non mandatory and user can insert in values to the lov field and text field and submit it.
    SO basically based on check box field selection i need to make the lov field in such a way it should accept all the values what user enters instead of check the query added in VO behind the LOV.
    Please suggest me some pointers to achieve this requirement.
    Thanks
    Deb

    hi,
    in PFR use:
    if ("checkevent".equals(pageContext.getParameter(EVENT_PARAM))) 
                     HashMap hashMap = new HashMap();
                     String checkboxval=pageContext.getParameter("item2");
                  hashMap.put("checkboxval",checkboxval);
                    pageContext.setForwardURLToCurrentPage(hashMap ,
                    true, // retain the AM
                    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
                    OAWebBeanConstants.IGNORE_MESSAGES);
    and in PR use:
    if((pageContext.getParameter("checkboxval'))!=null)
    OAMessageLovInputBean lovInputBean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("item3");
          lovInputBean.setRequired("false");
    try it
    Regards
    Mahesh

  • Preventing check-box selection/de-selection

    Hi
    How can I prevent a user from selecting/de-selecting a check-box. I do not want to disable it.
    Thanks
    Sangeetha

    I was able to stop selection with a mouse by removing the MouseListeners from the checkBox.
    The same approach didn't work for removing KeyListeners, so I ended up adding a KeyListener and consuming the KeyStroke:
    MouseListener[] actions = (MouseListener[])checkBox.getListeners(MouseListener.class);
    for (int i = 0; i < actions.length; i++)
         checkBox.removeMouseListener( actions[i] );
    // KeyListener[] keys = (KeyListener[])checkBox.getListeners(KeyListener.class);
    // for (int i = 0; i < keys.length; i++)
    //     checkBox.removeKeyListener( keys[i] );
    checkBox.addKeyListener( new KeyAdapter()
         public void keyPressed(KeyEvent e) { e.consume(); }
    });Does anybody know why I couldn't remove the KeyListener?

  • Check Box Selection Questions

    Is it possible to make a selection with a check box, and then have it select a predetermined selection from a drop down menu?
    e.g. If I select "Los Angeles" from a series of office locations in my check boxes, can it automatically select an address from a drop down selection for that Los Angeles Office?
    Thanks for any help in advance
    Aaron

    Notice that this line
    request.getParameterValues("build1");
    is getting the value of the check box. The "checked" attribute is not the value, just the attribute.
    Oddly enough, I just wrote some code to do this today.
    First, add this little javascript method to your page.
    <SCRIPT language="JavaScript"> <!--  //Hide contents from older browsers
    function setHiddenTagFromCheckbox(checkbox, element) {
      if(checkbox.checked) {
        element.value="yes";  
      else {
        element.value="no";  
    // End hiding the contents -->
    </SCRIPT> 2) Add a hidden input field for each checkbox field.
    <input type="HIDDEN" name="prin2signhidden" value = "no">3) Add an onclick handler for the check box
    <input type=checkbox name="prin2sign" onclick="setHiddenTagFromCheckbox(document.formname.prin2sign, document.formname.prin2signhidden)">In your servlet check the value of prin2signhidden instead of the checkbox input.
    The forum is doing odd things to this source code. Any place you see a > you should actually have a "greater than" sign.

  • How to bind check box selected values in to anthore grid view in sharepoint programaticlly

    hi,
    we have grid view in that grid view we have check box ,when select check box that entire  row we want add to next grid view through grammatically in C#

    Hello,
    Here is some .NET blogs to achieve this:
    http://www.aspdotnet-suresh.com/2013/05/move-selected-gridview-rows-to-another.html
    http://www.aspsnippets.com/Articles/Transfer-Selected-Rows-from-one-GridView-to-Another-in-Asp.net.aspx
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to find the check box selected while using Class in ALV grid display

    hi,
    I am displaying the ALV report using Class 
    For Example: CALL METHOD MYGRID->SET_TABLE_FOR_FIRST_DISPLAY EXPORTING I_STRUCTURE_NAME = 'ACC1'
                                                             IS_VARIANT = GS_VARIANT
                                                             I_SAVE = 'A' "XSAVE
                                                             IS_LAYOUT  = LOUT
                                                     CHANGING  IT_FIELDCATALOG = IT_FIELD
                                                               IT_OUTTAB = ACC_NO[].
    In output i am getting 10 customer with check box, how do i find that customer number is selected.

    HI,
    Once user selects a check box, he would CLICK on a button ( say PROCESS )inorder to do the processing for the selected records. So in the PAI, under the EVENT ( OK CODE ) of the Button ( say PROCESS ), write the following code.
    CALL METHOD MYGRID->check_changed_data.
    Now,
    Loop at acc_no where check = `X`.
    Do the processing.
    endloop.
    Best regards,
    Prashant

  • Hundreds of fields to be populated on the basis of various check box selection

    Hi,
    I have a requirement I have to display 593 fields on the basis of user's checkbox selection. There are 8 checkboxes and multiple checkbox combinations which is not mentioned. I need to consider all possible selection and populate values accordingly. If user selects any 2 or 3 or 7 checkboxes, I need to display the inner join of (respective tables)of  all the selected checkboxes. please suggest me the best possible way that will take least amount of time. Do i need to populated all 593 fields multiple times as per the user selection? please help

    Hi..
    You need to create structures only during the Run time.
    Based upon the check box, we need to create a dynamic internal table or structures at run time.
    Runtime Type Services (RTTS) - ABAP Development - SCN Wiki
    SAP Cafe Corner!: Advanced ABAP Programming
    Please check these link. Still if you have any issues. Please let me know.
    SKR

Maybe you are looking for