CHECKBOX submission onclick

Hi. I have a small question to ask:
I am using struts with the Jsp page, and I am using the struts' HTML library.
So, having the following code:
<html:checkbox properties="SomeBeab.someFfield" onclick=SOMETHING styleClass="btn"/>
Instead of SOMETHING at the onclick attribute I have a javascript that submits the form. However, I ran into this trouble.
When the check box is not checked initially, the form gets subitted fine, the check box gets checked and everything that has to happen happens.
However, when the check box is initially checked and want to uncheck it, and on this unchecking I want the form to get submitted with the knowledge that a checkbox was cleared, THIS DOESN'T HAPPEN.
I found out that this is a common web problem - not just a JSP or struts'. I also heard that there is some way to mitigate this by using some kind form's reset() method of the Struts API, or something .. I am not clear on what it is and how to go about this. I'll greatly appreciate the help in this matter.

Well ... I didn't know about that .. thanks.
But .. that wasn't the sourse of the issue. I do have to put some programmatic validation it ....

Similar Messages

  • 4.2 - Checkbox : When onClick registered for, MRU not firing (demo incl)

    *** Hopefully this isn't a rehash, I've searched around but haven't found information on it. ***
    I have a wizard created tabular report with a Checkbox (Y/NULL) column. The wizard also created the MRU and MRD.
    In the page header, I've added the following Javascript function:
    function testme(pThis){}
    In the column attributes for my "Simple Checkbox", I added the follow to "Element Attributes":
    onClick="testme(this);"
    With this in place, when I click/unclick the checkbox and submit for a save using the MDU, the changed state of the checkbox is not saved to the database. Also, any new records (via new row) are added with a NULL for the checkbox field regardless of what is selected during creation.
    If I change "Element Attributes" to:
    onChange="testme(this);"
    Then the MDU works just fine. Only reason I'm worried about this is that I understand onChange can be problematic on certain IE versions.
    Thanks,
    Scott

    Howdy Howard (and others) -
    I was hoping someone would have an answer without generating an example, but I hi-jacked the demo and came up with one:
    http://apex.oracle.com/pls/apex/f?p=70849:9:16222360984434:::::
    Workspace: DenverScott
    UserName: Test_User
    P/W: Test123
    Page: 9
    Recreate Problem: Change the checkbox value of an item under OnChange and OnClick and press "Submit", only OnChange items actually change.
    On this report, the two columns "OnChange" and "OnClick" are the focus. They are both simple check boxes and basically have the same settings. They both call an empty javascript function "test_me(this)" when clicked. Difference is, the MRU works for the "OnChange" column, updates are applied. You can change the "Onclick" column and submit all you want and it does nothing.
    If you remove the event for OnClick="test_me(this);" from the "OnClick" column, the submit/updates work just fine.
    (If anyone changes the demo, please return to prior state for others to examine)
    Thanks,
    Scott

  • Checkbox Submission

    I have two checkboxes and I want it so when they are clicked
    on the form is submitted. How do I do this?
    ex.
    <cfoutput query="info" group="Topic_Key">
    <CFIF #Ability_Q# IS NOT " " AND #URL.Q# GTE 1>
    <span
    class="questionsNormal">#Ability_Q[1]#</span><br />
    <CFFORM name="q1"
    action="index.cfm?Topic_key=1&Q=2">
    <cfinput type="checkbox" name="Yes">YES<br />
    <cfinput type="checkbox" name="N0"> NO.
    </CFFORM>
    </CFIF>
    <br />
    <CFIF #Ability_Q# IS NOT " ">
    <CFIF #URL.Q# GTE 2>
    <span
    class="questionsNormal">#Ability_Q[2]#</span>
    </CFIF>
    </CFIF>
    </cfoutput>

    Can it be done through javascript like (although this code
    doesnt work) :
    <script language="javascript" type="text/javascript">
    function checkanswer(answer) {
    if (answer == "Yes") {
    open("index.cfm?Topic_Key=1&Q=2")
    else {
    open("index.cfm?Topic_Key=1&Q=1a")
    </script>
    <cfoutput query="info" group="Topic_Key">
    <CFIF #Ability_Q# IS NOT " " AND #URL.Q# GTE 1>
    <span
    class="questionsNormal">#Ability_Q[1]#</span><br />
    <CFFORM name="q1" action="this">
    <cfinput type="checkbox" name="Yes"
    onClick="submit();">YES<br />
    <cfinput type="checkbox" name="N0"
    onClick="checkanswer(this);"> NO.
    </CFFORM>
    </CFIF>
    <br />
    <CFIF #Ability_Q# IS NOT " ">
    <CFIF #URL.Q# GTE 2>
    <span
    class="questionsNormal">#Ability_Q[2]#</span>
    </CFIF>
    </CFIF>
    </cfoutput>

  • ScriptUI Checkbox onClick fires differently in CS5 vs CS3?

    I'm developing an application consisting of a ScriptUI interface and a custom InDesign template. The ScriptUI interface contains a few checkboxes, with onClick event handlers assigned to read their value and store them to a preferences variable whenever they change. This all works perfectly in InDesign CS3 which was my primary development environment.
    Now I need to get this application compatible with InDesign CS5, but the checkboxes seem to consistently be returning the wrong value. No matter whether my event handler reads this.value, event.target.value or a direct reference to the checkbox, the returned value is the opposite of the expected. If I use the direct reference to read the value from elsewhere though, the returned value is correct! It almost seems like in CS5 the onClick event handler is fired before the value is changed, while in CS3 it is fired after the value is changed. Just tried CS4 and it seems to behave the same way as CS5.
    Did they actually change the checkboxes to behave this way (which makes no sense to me) or am I doing something wrong? Is there any way to get the old behavior back, or is the only solution to manually invert the value if the script detects CS4 or later as the runtime?

    Mayhem SWE wrote:
     I wonder how the execution order is in a web browser. The only valid reason I can come up with to justify the CS4/5 change would be if this is how a web browser would behave (perhaps in order to give you an opportunity to cancel the event before the value is changed?), but it is still quite confusing and illogical IMHO...
    I totally agree with you. The reason behind this —I think— is that the ScriptUI event model has been modified in CS4 in order to enhance the compliance with the DOM Level 3 Events Specification — http://www.w3.org/TR/DOM-Level-3-Events — which states that the click event must be cancelable. Thus you probably can use myClickEvent.preventDefault() in CS4/CS5 while this probably has no effect in CS3 (not tested). I suppose that the checkbox value should be actually changed if and only if the event is completed and not canceled. That makes sense, but the counterpart is that there is no more equivalence between using the onClick handler and a 'pure' click event listener: myWidget.addEventListener(...)
    On this subject, the specification says that using the shortcut myWidget.onEvent = myFunction to register an 'event listener' depends on the host language: "Because the details of this are often language-specific, this type of event listener registration is not defined in this specification, but in general, any event type may be used as an attribute in this way by adding the prefix on- to the event type name, and events so dispatched should behave consistently with the event registration and propagation defined in this specification, with the same interfaces, properties, and methods." —DOM Level3 Events Specification, 4.3 "Interface EventTarget", note 2.
    Of course, the easiest approach is to use myCheckbox.onClick = ... since the handler is called once the value has been updated, whatever the version of ScriptUI. But I don't believe it's a good practice if you're working on a complex project —especially a library!— because the onClick handler can be easily rewritten by the client code, and because you may need to deal with event propagation/cancellation at a deeper level. For my part I always use addEventListener(...) and removeEventListener(...) in my library code, although it implies that I fit my implementation to the ScriptUI version. (In CS3, reversing the checkbox value, etc.) That way the client code cannot pollute the basic behavior of my widgets.
    Hope that helps,
    @+
    Marc

  • SOLVED: Limit default view with Multiple non-destructive filters mode

    This was solved:
    I deleted the { subPaths: "word" } within my dataset. The dataset was pulling and displaying the subpath content which I don't need.
    ==================================================================
    Hi,
    I’m using the Multiple Filters Mode Sample to filter headlines in my xml file by the keywords associated with them.
    My question is, with no filters selected, how do you display only one headline for the default view? So, instead of the <headline> node repeating itself for every keyword within that node, it just displays one headline. I just want to display only one headline instead of repeating the headline based on the amount of keywords associated with it.
    If you view the donut example given a donut is displayed for every topping associated with it.
    I’m not as experienced with JS but I thought that if I create an array of all the possible keyword combinations and then use an if-then to display just one combination then it might work. The problem is that the amount of keywords will grow with time. I might amass 15-20 keywords in the next month, so an array might not be practical.
    Also, my “Remove All Filters” doesn’t work. The debugger is giving me an error that states: ‘documents.forms.0.noneCB’ is null or not an object -This would mean that the checkbox has not been selected is this correct?
    I’ve included the code and my xml data below. Any assistance would be greatly appreciated!
    <html>
    <head>
    <script language="JavaScript" type="text/javascript" src="/SpryAssets/xpath.js"></script>
    <script language="JavaScript" type="text/javascript" src="/SpryAssets/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript" src="/SpryAssets/SpryDataExtensions.js"></script>
    <script type="text/javascript">
    <!--
    var dsHeadlines = new Spry.Data.XMLDataSet("headlines_test.xml", "/headlines/headline", { subPaths: "word" });
    function ffNone(ds, row, index){ return (row.word == "None") ? row : null; };
    function ffJudicial(ds, row, index){ return (row.word == "Judicial leadership") ? row : null; };
    function ffProBono(ds, row, index){ return (row.word == "Pro bono") ? row : null; };
    function ffHearings(ds, row, index){ return (row.word == "ATJ hearings and events") ? row : null; };
    function ffCreation(ds, row, index){ return (row.word == "ATJ entities creation and structure") ? row : null; };
    function ToggleFilter(enable, f)
                if (enable)
                            dsHeadlines.addFilter(f, true);
                else
                            dsHeadlines.removeFilter(f, true);
    function RemoveAllFilters()
                document.forms[0]["noneCB"].checked = false;
                document.forms[0]["judicialCB"].checked = false;
                document.forms[0]["probonoCB"].checked = false;
                document.forms[0]["hearingsCB"].checked = false;
                document.forms[0]["creationCB"].checked = false;
                dsHeadlines.removeAllFilters(true);
    -->
    </script>
    </head>
    <body>
                <div class="liveSample" style="float: left; margin-bottom: 4px;">
                <form action="">
                <p>Select any of the following:</p>
                <ul style="list-style:none">
                    <li><label><input name="noneCB" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffNone);" />None</label></li>
                    <li><label><input name="judicialCB" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffJudicial);" />Judicial leadership</label></li>
                    <li><label><input name="probonoCB" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffProBono);" />Pro Bono</label></li>
                    <li><label><input name="hearingsCB" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffHearings);" />ATJ hearings/events</label></li>
                    <li><label><input name="creationCB" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffCreation);" />ATJ entities: creation and structure</label></li>
    </ul>
                <p><label>Filter Mode: <select onchange="dsHeadlines.setFilterMode(this.value, true);"><option value="and" selected="selected">-- AND --</option><option value="or">-- OR --</option></select></label>
                <input type="button" value="Remove All Filters" onclick="RemoveAllFilters();" /></p>
                </form>
                </div>
                <div spry:region="dsHeadlines">
                    <table>
                        <tr><th>Title</th><th>Date</th><th>State</th></tr>
                        <tr spry:repeat="dsHeadlines"><td valign="top"><a href="{hyperlink}">{title}</a><p></p></td><td valign="top">{date}</td><td valign="top">{state}</td></tr>
                    </table>
                </div>
    </body>
    </html>
    <?xml version="1.0" encoding="UTF-8"?>
    <headlines>
      <headline>
        <id>1</id>
        <title>
          <![CDATA[Save the date! 2009 National Meeting of State Access to Justice Chairs will take place in Orlando in Saturday, May 16, 2009. Invitations will be mailed out in late January.]]>
        </title>
        <hyperlink>
          <![CDATA[http://www.abanet.org/legalservices/sclaid/atjresourcecenter/annualmeeting.html]]>
        </hyperlink>
        <state>FL</state>
        <date>20090516</date>
        <word id="0001">None</word>
      </headline>
      <headline>
        <id>2</id>
        <title>
          <![CDATA[ABA Day in Washington. ABA Day legislative visits on April 21-22 will focus solely on access to justice issues. Register and receive materials, training, and schedule of events free before March 14 at: http://www.abanet.org/poladv/abaday09/.]]>
        </title>
        <hyperlink>
          <![CDATA[http://www.abanet.org/poladv/abaday09/]]>
        </hyperlink>
        <state>DC</state>
        <date>20090421</date>
        <word id="0002">Pro bono</word>
        <word id="0004">ATJ hearings and events</word>
        <word id="0005">Judicial leadership</word>
      </headline>
      <headline>
        <id>3</id>
        <title>
          <![CDATA[North Carolina Bar Association and North Carolina Bar Association Foundation host second annual 4ALL Statewide Service Day ask-a-lawyer event at five call centers around the state. (3/6/2009)]]>
        </title>
        <hyperlink>
          <![CDATA[http://www.4allnc.org/]]>
        </hyperlink>
        <state>NC</state>
        <date>20090306</date>
        <word id="0002">Pro bono</word>
      </headline>
      <headline>
        <id>4</id>
        <title>
          <![CDATA[Wyoming Access to Justice Commission holds its first meeting. (2/27/2009)]]>
        </title>
        <hyperlink>
          <![CDATA[http://www.nlada.org/DMS/Documents/1236184561.24/AJC%20Appointing%20Order%202009.pdf]]>
        </hyperlink>
        <state>WY</state>
        <date>20090227</date>
        <word id="0003">ATJ entities creation and structure</word>
      </headline>
      <headline>
        <id>5</id>
        <title>
          <![CDATA[Tennessee’s Supreme Court launches Access to Justice Campaign with the first in a series of public hearings. (2/26/2009)]]>
        </title>
        <state>TN</state>
        <date>20090226</date>
        <word id="0003">ATJ entities creation and structure</word>
        <word id="0004">ATJ hearings and events</word>
        <word id="0005">Judicial leadership</word>
      </headline>
    </headlines>

    1) I deleted bridge-utils, netcfg
    2) I edited /etc/hostapd/hostapd.conf:
    interface=wlan0
    #bridge=br0
    edited /etc/dnsmasq.conf:
    interface=wlan0
    dhcp-range=192.168.0.2,192.168.0.255,255.255.255.0,24h
    and edited /etc/rc.local:
    ifconfig wlan0 192.168.0.1 netmask 255.255.255.0
    ifconfig wlan0 up
    3) I added in autostart these daemons: hostapd, dnsmasq and iptables.
    Profit!

  • Validation error for non-null throws false error condition

    I am trying to perform a DML (INSERT) with a form element (textbox) that has been disabled on the form.
    The objective is to allow the user to:
    1) disable a form element using javascript when a radio element is selected - works OK using an onclick event
    2) user clicks a button to ENTER (perform a INSERT DML) - here the validation throws an error but I have enabled the previously disabled form element and I have used $x_Value() to input a value into the form element by onsubmit event on button.
    If I remove the validation error trap the DML saves the appropriate value.
    I can create two buttons and it works:
    1 button to enable fields that were previously disabled
    2 button to perform DML. (works if after button 1 I set focus on any form field with my mouse.)
    Any help would be appreciated.
    marshall

    Knight,
    Thanks for your interest in helping.
    I am trying not to create a situation w/bugs and such. I think I can devise a work around but I would like a more "correct" solution. ;-)
    To explain what I am doing I have a form that a person can use to enter a complaint. The person can give their last - middle - first name but they can also decide to be anonymous. If anonymous they click checkbox. Onclick of checkbox I fire javascript to disable name fields and place "Anonymous" in the last_name disabled field. The user can enter other data and when the user clicks ENTER I want to insert into the DB but the validation error trap of APEX sees a disabled field as a null. I want to place "Anonymous" in the last name field and then save the record with other data besides name.
    To add to it - I can create two buttons 1-button enables and 2-button inserts and the same code works if I touch( give focus) to a field in between enabling and inserting into the DB
    Does that help explain better.
    Thanks again - hope you or someone can help - best regards.

  • Multiple Non-Destructive Filter Paged View

    Example - non-working See
    code below
    I would like to apply the multiple filter example to data
    loaded in a paged view.
    So far everything loads and the form controls all work, but
    independently.
    Using the States/Cities data, theoretically a user should be
    able to select the state > show cities that start with Q-Z >
    then search which cities contain X.
    OR
    Select State > Search Cities that contain X > remove
    cities that start with A-H.
    Any thoughts? Any further details need explain?
    My final goal will be to add a third data source such as
    population, where a user could filter out the cities according to
    population size instead of the city names.
    Apologies if this has been addressed in another thread, where
    can I find it?
    I also cannot find documentation on SpryDataExtensions.
    <---Code--->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Spry.Data.PagedView Sample</title>
    <link href="../../css/samples.css" rel="stylesheet"
    type="text/css" />
    <style type="text/css">
    .select {
    background-color: black;
    color: white;
    .hover {
    background-color: #FFCC66;
    color: black;
    .currentPage {
    font-weight: bold;
    color: red;
    </style>
    <script language="JavaScript" type="text/javascript"
    src="xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryData.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryDataExtensions.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="SpryPagedView.js"></script>
    <script language="JavaScript" type="text/javascript">
    <!--
    var dsStates = new Spry.Data.XMLDataSet("states/states.xml",
    "/states/state");
    var dsCities = new
    Spry.Data.XMLDataSet("states/{dsStates::url}",
    "/state/cities/city");
    // Create a PagedView that will manage the paging of the data
    that is loaded
    // into dsCities.
    var pvCities = new Spry.Data.PagedView(dsCities, { pageSize:
    20 });
    var pvCitiesPagedInfo = pvCities.getPagingInfo();
    // FilterData() and StartFilterTimer() are not required for
    paging at all. They are
    // here only to support the filtering function used within
    this sample to show that
    // the PagedView automatically adjusts paging as the data in
    the data set it depends
    // on changes dynamically.
    function FilterData()
    var tf = document.getElementById("filterTF");
    if (!tf.value)
    // If the text field is empty, remove any filter
    // that is set on the data set.
    dsCities.filter(null);
    return;
    // Set a filter on the data set that matches any row
    // that begins with the string in the text field.
    var regExpStr = tf.value;
    if (!document.getElementById("containsCB").checked)
    regExpStr = "^" + regExpStr;
    var regExp = new RegExp(regExpStr, "i");
    var filterFunc = function(ds, row, rowNumber)
    var str = row["name"];
    if (str && str.search(regExp) != -1)
    return row;
    return null;
    dsCities.filter(filterFunc);
    function StartFilterTimer()
    if (StartFilterTimer.timerID)
    clearTimeout(StartFilterTimer.timerID);
    StartFilterTimer.timerID = setTimeout(function() {
    StartFilterTimer.timerID = null; FilterData(); }, 100);
    function ffAH(ds, row, index){ var c = row.name.charAt(0);
    return c >= 'A' && c <= 'H' ? null : row; };
    function ffIP(ds, row, index){ var c = row.name.charAt(0);
    return c >= 'I' && c <= 'P' ? null : row; };
    function ffQZ(ds, row, index){ var c = row.name.charAt(0);
    return c >= 'Q' && c <= 'Z' ? null : row; };
    function ToggleFilter(enable, f)
    if (enable)
    dsCities.addFilter(f, true);
    else
    dsCities.removeFilter(f, true);
    function RemoveAllFilters()
    document.forms[0]["fAH"].checked = false;
    document.forms[0]["fIP"].checked = false;
    document.forms[0]["fQZ"].checked = false;
    dsCities.removeAllFilters(true);
    -->
    </script>
    </head>
    <body>
    <!-- BEGIN Data loading and filtering controls. -->
    <div> Choose a State: <span spry:region="dsStates"
    id="stateSelector">
    <select spry:repeatchildren="dsStates" name="stateSelect"
    onchange="dsStates.setCurrentRowNumber(this.selectedIndex);">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
    value="{name}" selected="selected">{name}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
    value="{name}">{name}</option>
    </select>
    </span> Enter the Name of a City:
    <input type="text" id="filterTF"
    onkeyup="StartFilterTimer();" />
    Contains:
    <input type="checkbox" id="containsCB" checked="checked"
    onchange="FilterData();" />
    </div>
    <!-- END Data loading and filtering controls. -->
    <div class="liveSample" >
    <form action="">
    <label>Filter out 'A' - 'H':
    <input name="fAH" type="checkbox" value=""
    onclick="ToggleFilter(this.checked, ffAH);" />
    </label>
    <label>Filter out 'I' - 'P':
    <input name="fIP" type="checkbox" value=""
    onclick="ToggleFilter(this.checked, ffIP);" />
    </label>
    <label>Filter out 'Q' - 'Z':
    <input name="fQZ" type="checkbox" value=""
    onclick="ToggleFilter(this.checked, ffQZ);" />
    </label>
    <input type="button" value="Remove All Filters"
    onclick="RemoveAllFilters();" />
    </form>
    </div>
    <!-- BEGIN PagedView Controls -->
    <p spry:region="pvCitiesPagedInfo"
    spry:repeatchildren="pvCitiesPagedInfo"> <a
    spry:if="{ds_CurrentRowNumber} != {ds_RowNumber}" href="#"
    onclick="pvCities.goToPage('{ds_PageNumber}'); return
    false;">{ds_PageFirstItemNumber}-{ds_PageLastItemNumber}</a>
    <span spry:if="{ds_CurrentRowNumber} == {ds_RowNumber}"
    class="currentPage">{ds_PageFirstItemNumber}-{ds_PageLastItemNumber}</span>
    </p>
    <!-- END PagedView Controls -->
    <!-- BEGIN PagedView Info Section -->
    <div spry:region="pvCities">
    <p spry:if="{ds_UnfilteredRowCount} &gt; 0">Page
    {ds_PageNumber} of {ds_PageCount} - Items {ds_PageFirstItemNumber}
    - {ds_PageLastItemNumber} of {ds_UnfilteredRowCount}</p>
    <p spry:if="{ds_UnfilteredRowCount} == 0">No matching
    data found!</p>
    </div>
    <!-- END PagedView Info Section -->
    <!-- BEGIN Paged Display Section -->
    <div spry:region="pvCities dsCities">
    <ul spry:repeatchildren="pvCities"
    spry:choose="choose">
    <li spry:when="{pvCities::ds_RowID} ==
    {dsCities::ds_CurrentRowID}" spry:select="select"
    spry:selectgroup="page" spry:selected="selected" spry:hover="hover"
    spry:setrow="pvCities">{pvCities::name}</li>
    <li spry:default="default" spry:select="select"
    spry:selectgroup="page" spry:hover="hover"
    spry:setrow="pvCities">{pvCities::name}</li>
    </ul>
    </div>
    <!-- END Paged Display Section -->
    </body>
    </html>

    Hi,
    Im using the same sample, How can you make so it can also search for xml attribute values?
    Like for example the ABC in title? <role title="ABC">Example</role>
    thank you!

  • Using spry to filter age or date range?

    I'm trying to create a spry filter to filter between age or date ranges. I can get the code to filter an age if it's greater or below a number, but not a range between numbers. How can I modify the following code to filter between a  range of numbers? I would prefer to use drop down for age range choices so the user can choose each age from a drop down menu but I wasn't having much luck with it whereas the checkbox was somewhat working for me. If someone has a drop down method to select ages and have spry filter between the values I would be very grateful. Many thanks in advance!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Multiple Filters Sample</title>
    <link href="http://labs.adobe.com/technologies/spry/css/samples.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryDataExtensions.js"></script>
    <script type="text/javascript">
    <!--
    var dsStates = new Spry.Data.XMLDataSet("states.xml", "states/state");
    dsStates.setColumnType("name", "number");
    function ff15(ds, row, index){ var c = row.name; return c >= '6' && c <= '100' ? null : row; };
    function ffIP(ds, row, index){ var c = row.name; return c >= '11' && c <= '100' ? null : row; };
    function ffQZ(ds, row, index){ var c = row.name; return c >= '0' && c <= '10' ? null : row; };
    function ToggleFilter(enable, f)
         if (enable)
              dsStates.addFilter(f, true);
         else
              dsStates.removeFilter(f, true);
    function RemoveAllFilters()
         document.forms[0]["f15"].checked = false;
         document.forms[0]["fIP"].checked = false;
         document.forms[0]["fQZ"].checked = false;
         dsStates.removeAllFilters(true);
    -->
    </script>
    </head>
    <body>
    <div class="liveSample" style="float: left; margin-bottom: 4px;">
         <form action="">
         <label>Show '1' - '5': <input name="f15" type="checkbox" value="" onclick="ToggleFilter(this.checked, ff15);" /></label><br />
         <label>Show '6' - '10': <input name="fIP" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffIP);" /></label><br />
         <label>Show '11' - '20': <input name="fQZ" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffQZ);" /></label><br />
         <input type="button" value="Remove All Filters" onclick="RemoveAllFilters();" />
         </form>
         <div spry:region="dsStates" spry:repeatchildren="dsStates">
              <span>{name}</span>
         </div>
    </div>
    </body>
    </html>
    <states>
         <state>
              <name>1</name>
         </state>
         <state>
              <name>2</name>
         </state>
         <state>
              <name>3</name>
         </state>
         <state>
              <name>4</name>
         </state>
         <state>
              <name>5</name>
         </state>
    etc. etc.
    </states>

    The syntax for the xml file along with the rest of the source was provided in the original post. Here's the modified html file. How do I concactenate if (cat = 2) if (cat = 3) etc. into the function? Thanks in advance.
    Also as you can see from my modified html source, I want two separate drop downs: one for MINage and one for MAx age. From looking at my provided source I have a feeling that when a user clicks on one or the other drop downs it will trigger the function for that selection and cancel the other filter out, which is undesired. So I am wondering how to have two drop downs work to filter between min and max age where if a user clicks on one drop down it doesn't cancel the function of the previous filter selection.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Multiple Filters Sample</title>
    <link href="http://labs.adobe.com/technologies/spry/css/samples.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryDataExtensions.js"></script>
    <script type="text/javascript">
    <!--
    var dsStates = new Spry.Data.XMLDataSet("states.xml", "states/state");
    dsStates.setColumnType("name", "number");
    function MINage(cat){
         if (cat = 1)
           dsStates.setXPath('states/state[name > 0]');
         dsStates.loadData();
    function MAXage(cat){
         if (cat = 10)
           dsStates.setXPath('states/state[name < 10]');
         dsStates.loadData();
    -->
    </script>
    <style type="text/css">
    <!--
    .badge {
         float: left;
         margin: 4px;
         padding: 4px;
         text-align: center;
         background-color: #FFCC99;
         border-top: solid 1px #999999;
         border-left: solid 1px #999999;
         border-bottom: solid 1px #CCCCCC;
         border-right: solid 1px #CCCCCC;
    label {
         font-weight: bold;
    -->
    </style>
    </head>
    <body>
    <h3>Multiple Filters Sample</h3>
    <div class="liveSample" style="float: left; margin-bottom: 4px;">
    <form action="">
    <select name="ageCat" onchange="MINage(this.value)">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
        <option value="31">31</option>
        <option value="32">32</option>
        <option value="33">33</option>
        <option value="34">34</option>
        <option value="35">35</option>
        <option value="36">36</option>
        <option value="37">37</option>
        <option value="38">38</option>
        <option value="39">39</option>
        <option value="40">40</option>
        <option value="41">41</option>
        <option value="42">42</option>
        <option value="43">43</option>
        <option value="44">44</option>
        <option value="45">45</option>
        <option value="46">46</option>
        <option value="47">47</option>
        <option value="48">48</option>
        <option value="49">49</option>
        <option value="50">50</option>
        <option value="51">51</option>
        <option value="52">52</option>
        <option value="53">53</option>
        <option value="54">54</option>
        <option value="55">55</option>
        <option value="56">56</option>
        <option value="57">57</option>
        <option value="58">58</option>
        <option value="59">59</option>
        <option value="60">60</option>
        <option value="61">61</option>
        <option value="62">62</option>
        <option value="63">63</option>
        <option value="64">64</option>
        <option value="65">65</option>
        <option value="66">66</option>
        <option value="67">67</option>
        <option value="68">68</option>
        <option value="69">69</option>
        <option value="70">70</option>
        <option value="71">71</option>
        <option value="72">72</option>
        <option value="73">73</option>
        <option value="74">74</option>
        <option value="75">75</option>
        <option value="76">76</option>
        <option value="77">77</option>
        <option value="78">78</option>
        <option value="79">79</option>
        <option value="80">80</option>
        <option value="81">81</option>
        <option value="82">82</option>
        <option value="83">83</option>
        <option value="84">84</option>
        <option value="85">85</option>
        <option value="86">86</option>
        <option value="87">87</option>
        <option value="88">88</option>
        <option value="89">89</option>
        <option value="90">90</option>
        <option value="91">91</option>
        <option value="92">92</option>
        <option value="93">93</option>
        <option value="94">94</option>
        <option value="95">95</option>
        <option value="96">96</option>
        <option value="97">97</option>
        <option value="98">98</option>
        <option value="99">99</option>
      </select>
    <select name="ageCat" onchange="MAXage(this.value)">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
        <option value="31">31</option>
        <option value="32">32</option>
        <option value="33">33</option>
        <option value="34">34</option>
        <option value="35">35</option>
        <option value="36">36</option>
        <option value="37">37</option>
        <option value="38">38</option>
        <option value="39">39</option>
        <option value="40">40</option>
        <option value="41">41</option>
        <option value="42">42</option>
        <option value="43">43</option>
        <option value="44">44</option>
        <option value="45">45</option>
        <option value="46">46</option>
        <option value="47">47</option>
        <option value="48">48</option>
        <option value="49">49</option>
        <option value="50">50</option>
        <option value="51">51</option>
        <option value="52">52</option>
        <option value="53">53</option>
        <option value="54">54</option>
        <option value="55">55</option>
        <option value="56">56</option>
        <option value="57">57</option>
        <option value="58">58</option>
        <option value="59">59</option>
        <option value="60">60</option>
        <option value="61">61</option>
        <option value="62">62</option>
        <option value="63">63</option>
        <option value="64">64</option>
        <option value="65">65</option>
        <option value="66">66</option>
        <option value="67">67</option>
        <option value="68">68</option>
        <option value="69">69</option>
        <option value="70">70</option>
        <option value="71">71</option>
        <option value="72">72</option>
        <option value="73">73</option>
        <option value="74">74</option>
        <option value="75">75</option>
        <option value="76">76</option>
        <option value="77">77</option>
        <option value="78">78</option>
        <option value="79">79</option>
        <option value="80">80</option>
        <option value="81">81</option>
        <option value="82">82</option>
        <option value="83">83</option>
        <option value="84">84</option>
        <option value="85">85</option>
        <option value="86">86</option>
        <option value="87">87</option>
        <option value="88">88</option>
        <option value="89">89</option>
        <option value="90">90</option>
        <option value="91">91</option>
        <option value="92">92</option>
        <option value="93">93</option>
        <option value="94">94</option>
        <option value="95">95</option>
        <option value="96">96</option>
        <option value="97">97</option>
        <option value="98">98</option>
        <option value="99">99</option>
      </select>
         </form>
         <div spry:region="dsStates" spry:repeatchildren="dsStates">
              <span class="badge">{name}</span>
         </div>
    </div>
    <p><br style="clear: both;" />
    </p>
    </body>
    </html>
    Thanks!

  • Multiple Filters Mode Problem

    I have been trying to implement the Multiple Non-Destructive Filters Mode sample at http://labs.adobe.com/technologies/spry/samples/data_region/MultipleFiltersModeSample.html but just cannot get it to work, although the data shows and is sort of sortable (that will be my next query as if you click on 'Opposition' it does not sort it alphabetically but I think that may be to do with column types).
    I simply copied the codes from the example and changed the function names, row names and dataset names to suit my needs but neither of the filters work.
    The file that it is used in is http://www.margate-fc.com/reserves/resfixres0910.php and the dataset is in http://www.margate-fc.com/reserves/resfixres.html.
    My <Head> script for the dataset is
    <script type="text/javascript">
    <!--
    var ReservesFix0910 = new Spry.Data.HTMLDataSet("resfixres.html", "resfixres", {sortOnLoad: "MatchNo", sortOrderOnLoad: "ascending"});
    ReservesFix0910.setColumnType("MatchNo", "number"), ReservesFix0910.setColumnType("Date", "date");
    function ffLGE(ds, row, index){ return (row.Comp == "LGE") ? row : null; };
    function ffKIC(ds, row, index){ return (row.Comp == "KIC") ? row : null; };
    function ToggleFilter(enable, f)
    if (enable)
    ReservesFix0910.addFilter(f, true);
    else
    ReservesFix0910.removeFilter(f, true);
    function RemoveAllFilters()
    document.forms[0]["LGECB"].checked = false;
    document.forms[0]["KICCB"].checked = false;
    ReservesFix0910.removeAllFilters(true);
    //-->
    </script>
    And the code for the data is
    <div>
        <form action="">
    <p>
      <label>
        <input name="LGECB" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffLGE);" />
        League</label>
      <label>
        <input name="KICCB" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffKIC);" />
        Kent Intermediate Cup</label>
    </p>
    <p><label>Filter Mode: <select onchange="ReservesFix0910.setFilterMode(this.value, true);"><option value="and" selected="selected">-- AND --</option><option value="or">-- OR --</option></select></label>
    <input type="button" value="Remove All Filters" onclick="RemoveAllFilters();" /></p>
    </form>
        <div spry:region="ReservesFix0910">
        <table>
          <tr>
            <th spry:sort="Date">Date</th>
            <th spry:sort="Comp">Comp</th>
            <th spry:sort="H/A">H/A</th>
            <th spry:sort="Opposition">Opposition</th>
            <th spry:sort="Res">Res</th>
            <th spry:sort="F">F</th>
            <th spry:sort="column7"> </th>
            <th spry:sort="A">A</th>
          </tr>
          <tr spry:repeat="ReservesFix0910">
            <td>{Date}</td>
            <td>{Comp}</td>
            <td>{H/A}</td>
            <td>{Opposition}</td>
            <td>{Res}</td>
            <td>{F}</td>
            <td>{column7}</td>
            <td>{A}</td>
          </tr>
        </table>
      </div></div>
    I am assuming that I am missing something very simple that is stopping this working. Even when I found a rogue dsDonuts reference from the original code still in mine and changed it nothing worked and I am pretty sure that all the code is now referencing my files and datasets.
    Do I need to use anything else such as xpaths to make this work? I noticed that the sample had and xpaths reference and was linked to an xpaths js file so perhaps that is needed as well but am not sure how I would implement it.
    Thanks in advance for any advice.
    Steve.

    I have been trying to implement the Multiple Non-Destructive Filters Mode sample at http://labs.adobe.com/technologies/spry/samples/data_region/MultipleFiltersModeSample.html but just cannot get it to work, although the data shows and is sort of sortable (that will be my next query as if you click on 'Opposition' it does not sort it alphabetically but I think that may be to do with column types).
    I simply copied the codes from the example and changed the function names, row names and dataset names to suit my needs but neither of the filters work.
    The file that it is used in is http://www.margate-fc.com/reserves/resfixres0910.php and the dataset is in http://www.margate-fc.com/reserves/resfixres.html.
    My <Head> script for the dataset is
    <script type="text/javascript">
    <!--
    var ReservesFix0910 = new Spry.Data.HTMLDataSet("resfixres.html", "resfixres", {sortOnLoad: "MatchNo", sortOrderOnLoad: "ascending"});
    ReservesFix0910.setColumnType("MatchNo", "number"), ReservesFix0910.setColumnType("Date", "date");
    function ffLGE(ds, row, index){ return (row.Comp == "LGE") ? row : null; };
    function ffKIC(ds, row, index){ return (row.Comp == "KIC") ? row : null; };
    function ToggleFilter(enable, f)
    if (enable)
    ReservesFix0910.addFilter(f, true);
    else
    ReservesFix0910.removeFilter(f, true);
    function RemoveAllFilters()
    document.forms[0]["LGECB"].checked = false;
    document.forms[0]["KICCB"].checked = false;
    ReservesFix0910.removeAllFilters(true);
    //-->
    </script>
    And the code for the data is
    <div>
        <form action="">
    <p>
      <label>
        <input name="LGECB" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffLGE);" />
        League</label>
      <label>
        <input name="KICCB" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffKIC);" />
        Kent Intermediate Cup</label>
    </p>
    <p><label>Filter Mode: <select onchange="ReservesFix0910.setFilterMode(this.value, true);"><option value="and" selected="selected">-- AND --</option><option value="or">-- OR --</option></select></label>
    <input type="button" value="Remove All Filters" onclick="RemoveAllFilters();" /></p>
    </form>
        <div spry:region="ReservesFix0910">
        <table>
          <tr>
            <th spry:sort="Date">Date</th>
            <th spry:sort="Comp">Comp</th>
            <th spry:sort="H/A">H/A</th>
            <th spry:sort="Opposition">Opposition</th>
            <th spry:sort="Res">Res</th>
            <th spry:sort="F">F</th>
            <th spry:sort="column7"> </th>
            <th spry:sort="A">A</th>
          </tr>
          <tr spry:repeat="ReservesFix0910">
            <td>{Date}</td>
            <td>{Comp}</td>
            <td>{H/A}</td>
            <td>{Opposition}</td>
            <td>{Res}</td>
            <td>{F}</td>
            <td>{column7}</td>
            <td>{A}</td>
          </tr>
        </table>
      </div></div>
    I am assuming that I am missing something very simple that is stopping this working. Even when I found a rogue dsDonuts reference from the original code still in mine and changed it nothing worked and I am pretty sure that all the code is now referencing my files and datasets.
    Do I need to use anything else such as xpaths to make this work? I noticed that the sample had and xpaths reference and was linked to an xpaths js file so perhaps that is needed as well but am not sure how I would implement it.
    Thanks in advance for any advice.
    Steve.

  • Can I use my javascript to change the session state of an item?

    All,
    I currently have a page that has two regions: a report and a checkbox region. The checkbox region is full of checkboxes that are tied to each column in the report. I have javascript in the page HTML header that hides/displays the report column when they click the corresponding checkbox. The hiding and displaying columns works just fine.
    Here is my problem: my users need to export the report (with some columns hidden) as a CSV file. Unfortunately, the javascript function I use to hide/show the columns does not change the session value of the checkbox region and thus, APEX does not 'know' that some columns have been hidden. Because of this, APEX exports ALL columns.
    Can I add an onChange to my javascript that each time the user checks/unchecks a box, it adds/removes that item from the checkbox region's session value?
    Thanks!
    BoilerUP
    P.S. I do not want to submit the page - I would like for this to be done on the fly, just like the columns hiding/appearing with the javascript. Thanks!
    Message was edited by:
    BoilerUP

    Ok, I still cannot get this to work. I keep getting a javascript page error (yellow exclamation icon in I.E.) I have the following code in the HTML header:
    <script language="JavaScript" type="text/javascript">
    function va_GetCheckboxes(pName)
    var d=document;
    var l_return = "";
    var inputs=d.body.getElementsByTagName('INPUT');
    var l_el;
    for (var j=0;j<inputs.length;j++) {
         l_el = inputs[j];
         if (l_el.type=="checkbox" && l_el.name && l_el.name==pName
             && l_el.checked) {
                l_return += ":" + l_el.value;
    return l_return.substring(1);
    </script>I also have the following code in the HTML Form Element Attributes section for the checkbox item:
    onclick="html_HideBasedOnCheckBox(this,this.value);set_Some_Item('P2_COLUMN_HIDE_CHECKBOXES',that_string)"Do I need to replace "that_string" with something or is there something else that I'm doing wrong?

  • Dynamically displaying multi parameters values

    Hi,
    I'm newbie to this framework and I have successfully
    implemented some of the demos posted in this site. BTW, kudos to
    all who contributed all those demos.
    Well, I after trying most of the demos, I am trying to
    implemented .... dynamically displaying content from the xml file
    when users click on multiple choices. Let say, I have the check
    boxes for the following option:
    Subjects: [ ] Math [ ] Biology [ ] Computer Science and so
    on.
    So when the users click on these checkboxes, it will display
    books related to the selected subject/s.
    If anybody have implemented similar functionality, can you
    please give me an idea/suggestion? Any help will be appericated.
    Cheers,
    nj

    Hi all,
    I have been trying to implement "Multiple filter" (
    http://labs.adobe.com/technologies/spry/samples/data_region/MultipleFiltersModeSample.html )
    using more dymanic approach however, it is not working correctly.
    Here is my code .... can you plz give any suggestion handling this
    issue?
    <?xml version="1.0" encoding="utf-8"?>
    <books xmlns="
    http://www.books.com/books">
    <subjects>
    <list>Math</list>
    <list>Biology</list>
    <list>Economices</list>
    <list>English</list>
    <list>Physices</list>
    <list>History</list>
    </subjects>
    <book>
    <title>Intro to Biology</title>
    <subject>Biology</subject>
    <desc>Introduction to Human Biology</desc>
    </book>
    <book>
    <title>Intro to Geometry</title>
    <subject>Math</subject>
    <desc>Introduction to Elementry Geometry</desc>
    </book>
    <book>
    <title>Calculus I</title>
    <subject>Math</subject>
    <desc>Introduction to Elementry Calculus</desc>
    </book>
    <book>
    <title>Physices III</title>
    <subject>Physices</subject>
    <desc>Advanced physices, Newton's laws</desc>
    </book>
    <book>
    <title>19th Century Americam History</title>
    <subject>History</subject>
    <desc>Introduction to 19th century American
    History</desc>
    </book>
    <book>
    <title>Intro to Biology II</title>
    <subject>Biology</subject>
    <desc>Introduction to Human Biology</desc>
    </book>
    <book>
    <title>Intro to Biology III</title>
    <subject>Biology</subject>
    <desc>Introduction to Human Biology</desc>
    </book>
    <book>
    <title>Intro to Biology IV</title>
    <subject>Biology</subject>
    <desc>Introduction to Human Biology</desc>
    </book>
    </books>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <title>Testing</title>
    <!--
    Spry Framework
    ***************************************************** -->
    <script type="text/javascript"
    src="js/spry/xpath.js"></script>
    <script type="text/javascript"
    src="js/spry/SpryData.js"></script>
    <script type="text/javascript"
    src="js/spry/SpryDataExtensions.js"></script>
    <script type="text/javascript">
    <!--
    var subjectname;
    var dsSubjectFilter = new
    Spry.Data.XMLDataSet("xml/books.xml", "/books/book", { subPaths:
    "subject" });
    var dsSubjectList = new
    Spry.Data.XMLDataSet("xml/books.xml", "books/subjects, {subPaths:
    "list", sortOnLoad: "list"});
    function filterParameter(ds, row, index){return (row.subject
    == subjectname)? row : null;};
    function ToggleFilter(enable, filterParameter, name) {
    //alert("name : " + name);
    subjectname=name;
    if(enable)
    dsSubjectFilter.addFilter(filterParameter, true);
    else
    dsSubjectFilter.removeFilter(filterParameter, true);
    dsSubjectFilter.setFilterMode("or", true);
    //-->
    </script>
    <!-- ***************** END of Spry
    *********************** -->
    </head>
    <body>
    <div spry:state="ready">
    <div spry:region="dsSubjectList">
    <form action="">
    <ul>
    <h4>Subject</h4>
    <li spry:repeat="dsSubjectList"> <input
    type="checkbox" value="" onclick="ToggleFilter(this.checked,
    filterParameter,
    '{dsSubjectList::list}');"/>{dsSubjectList::list}</li>
    </ul>
    </form>
    </div>
    <div spry:region="dsSubjectFilter">
    <p> Count = {dsMissionFilter::ds_RowCount}</p>
    <div spry:repeat="dsSubjectFilter">
    <h4>{dsSubjectFilter::ds_RowNumberPlus1}. {dsSubjectFilter::title}</h4>
    <p> {dsSubjectFilter::subject}</p>
    <p> {dsSubjectFilter::desc}</p>
    </div>
    </div>
    </div> <!-- *** END of spry:state="ready"
    *****-->
    </body>
    </html>
    Basically, firstly it creates the checkboxes with the diff
    subjects to select. Once we start selecting those subjects, it shld
    start displaying the related books with titles, subject and
    description. However, the "or" doesn't seems to work .... any
    suggestion will be appericated.
    Cheers,
    nj

  • Check boxes with submit

    Hi
    Is it possible to have check boxes with submit in APEX like selected list with submit.
    The requirement is as follows
    we have different systems and under each system there are number of applications.
    The systems and applications should appear as checkboxes to select.
    If I select a particular checkbox for a system, list of applications under that system should appear in form of checkboxs.
    secondly, I should also have an option for selecting multiple systems and multiple applications.
    Can anyone advice me how this can be achieved.
    Thanks.

    in HTML Form Element Attributes of your CHECKBOX put:
    onClick="javascript:doSubmit(CHECK_BOX_CLICKED');"
    Hope this helps...

  • Select multiple rows

    Hi,
    I have a dynamic table of user accounts, and the user can select a single account from that table.  Each table row has a checkbox in the first column that the user can select, and, when selected, the index of that row is submitted to the form's java script object for further processing.  Using the index allows me to get that row's table data.  So far so good...
    Now the client wants to be able to have the ability to select multiple accounts from the dynamic table. So I will need to remove the checkbox's onClick event and add a button that the user can click once all accounts have been selected.
    How do I get a handle to the (one or more) checkboxes that were selected in the table rows?  Can you provide a javascript example?
    Thank you,
    Elaine

    Here is a view of my dynamic form...(click the image to see the whole thing)
    and the script attached to the "Get Selected" button.
    // form1.purchaseOrder.detailHeader.checkSelectedBtn::click - (JavaScript, client)
    var indexStr = getInstanceData(xfa.resolveNodes("detail[*].selected"));
    if (indexStr.length != 0) {
        for (var i=0;i < indexStr.length; i++) {
            xfa.host.messageBox("You selected " + indexStr.substring(i,i+1));
    function getInstanceData(node) {
        var str = "";
        if (node.length != 0) {
            for (nNodeCount=0; nNodeCount < node.length; nNodeCount++) {
                // test if the checkbox is selected
                if (node.item(nNodeCount).rawValue == "1") {
                    str += nNodeCount;
        return str;
    I substring and display the index string for demonstration purposes. The form and the sample data are attached. With any luck the virus scanner will not indefinitlely enqueue the assets.
    Steve

  • Filtering a list with an XML dataset in Spry 1.6.1?

    I have a typical XML data file.  I know how to load it, create a dataset, and then a master-detail display.
    However, what I need to do is create form items that will FILTER the master set as the user clicks options.
    For example, if the list is countries of the world, and the default is to show them all, there could be checkboxes and/or select menus that allow the user to choose countries only in Asia, or only monarchies, etc.
    I can't find any examples of how to do this sort of thing.  Are there any?

    That's very helpful, thanks.  What I am stuck on now is I am trying to "parameterize" my filter function, so I can pass the string to filter by from the checkbox to une function instead of having a filter function for each.
    for example this works to find all items where the color is red:
    var myFF = function(dataSet, row, rowNumber)
              if (row["color"].search('red') != -1)
                        return row;
              return null;
    function ToggleFilter(enable, f)
              if (enable)
               ds1.addFilter(f, true);
              else
              ds1.removeFilter(f, true);
    <label>Red: <input name="red1" type="checkbox" value="" onclick="ToggleFilter(this.checked, myFF);" /></label>
    I would rather have the function be for ANY color, and specify the color on the checkbox, such as this:
    <label>Red: <input name="red2" type="checkbox" value="" onclick="ToggleFilter(this.checked, myFF, 'red');" /></label>
    So that I can easily have checkboxes 'red' 'green' etc.  However I must not be doing it right since if I modify the ToggleFilter function to expect the third parameter, and add the parameter to the ds1.addFilter(f, true) the whole thing fails.

  • How to invoke a Servlet on onClick event of CheckBox ?

    Hi,
    Can anybody provide me with the code - how to invoke a Servlet & then pass all form variables to the Servlet on onClick Event of CheckBox in a JSP Page.
    I guess it is possible with Javascript but i need the code...
    Pls Help !
    Thanx.

    <html>
    <head>
    <script language="JavaScript">
    <!--
    function submitMyForm(){      
    document.myform.submit();
    //-->
    </script>
    </head>
    <body>
    <form name="myform" method="POST" action="http://mywebserver/servlet/myServlet" target=_top>
    <input type="checkbox" name="mycheckbox" OnClick = "javascript:submitMyForm()">
    </form>
    </body>
    </html>
    Hope this helps...

Maybe you are looking for

  • How to post a cross-company invoice using the BAPI_TRANSACTION_COMMIT?

    Hi I would like to post an inter-company invoice using the BAPI_TRANSACTION_COMMIT. There is a comp_code in the header strusture. The BAPI's documentation says that this is possible and in the ACCOUNTGL table there is a field COMP_CODE. The only prob

  • The Top10 most frequently asked questions and answers (FAQ) January 2009

    Dear SAP Business One Community members, We will provide you on a regular base the top10 most frequently asked questions together with the related answers. The Top10 from January: 1. How to install SAP Clients? According to the symptom, this issue ca

  • Prompt command

    I'm trying to bring up a prompt command. I can bring up the window but I cannot bring up the file with it when I type it in, if that makes any cense to anyone. this is what I have in my file class HelloWorld{ public static void main(string[]args) sys

  • Transfer OCI CUST_FIELDS into SC with BADI BBP_CATALOG_TRANSFER

    Hello guys, we want to transfer a 1 CHAR value that comes from the catalog (CCM 200)in OCI field CUST_FIELD1 into to the shopping cart. Are there any fields in the shopping cart item tables, that we can use. I cannot find any. I think field "DUMMY_EE

  • 10.4.6 freezes and I loose all saved data I have been working on for a week

    The computer reverts to what I was working on a week ago. Saved files disappear off desktop, Filemaker reverts to to the status of the file a week ago and does not include all the info added since then. I've lost everyhting I was working on. Any help