Two select lists in tabular form

I have two Select Lists which one of them depends on the another -the second one's query depends on the first one's - .....
This operation can be done in a form or a page, but how it could be done in a tabular form???
Saad

The simple answer is that to the best of my knowledge, it cannot be done because of how the tabular form works. If I understand it correctly, Tabular forms are populated completely at page load and cannot post back from items inside the form in order to refresh a list of values on the second select list. If you want to do this, you will need to build the form as a "Form and Report" page type where you have links in your report that populate a regular page form. Just tell it to put the form and the report on the same page them add a hidden page item that you set to 1 or 0 to display the form and setup the form processing so it is button tied instead of unconditional (You may have to duplicate auto processing processes).
The complex answer....there probably is a way to do this using AJAX as AJAX is good at this kind of stuff and every field in the tabular form has an HTML id of some kind....but I am not well versed enough in AJAX to give you a straight answer as to how to accomplish it. I used AJAX to do something similar to what your talking about but it was with regular page items (using a select list to populate a shuttle without a post back) and not items in a tabular form.

Similar Messages

  • Multiple select lists in tabular form

    Hi,
    I created a tabular form with two select lists (Queries are same for both the select list and results around 300 records in the SQL).
    I am getting the following error:
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    If I changed Select list to POP list, I am not getting error.
    Please suggest how to user select list in this case.
    Regards,
    Meda

    LnTInfotech wrote:
    I created a tabular form with two select lists (Queries are same for both the select list and results around 300 records in the SQL).
    I am getting the following error:
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    If I changed Select list to POP list, I am not getting error.
    Please suggest how to user select list in this case.It is not possible. There is a 32K limit on the HTML generated for select list items. (As a type of report, tabular forms are also subject to the 32K limit on the size of a report row.)
    In terms of usability 200 options is about the maximum size I would consider sensible for a select list ( and for select lists in tabular forms, much, much fewer!)
    Use Popup Key LOVs.

  • Dynamic Actions in Select List of Tabular Form

    I have a tabular form in my application and one of the column A is Select List with lot of values. My requirement is, there is another column B in the same tabular column like Display text, which should appear when a user select A, B or C in the select list column A. Is it possible, how can I implement it?
    I tried it through Dynamic Actions ->DOM Objects, but I am not sure what is the name of the Select List column value that needs to be specified, it is jst f06 or f06_???. Can someone tell me the exact steps that needs to be followed.

    My mistake, Javascript (and DOM attributes/methods) are case-sensitive. The attribute in question is readOnly, not readonly
    I fixed it on my example page at http://htmldb.oracle.com/pls/otn/f?p=24317:255
    <script type="text/javascript">
    function ro_Item(nd,a){
        var lEl = html_GetElement(nd);
        if (lEl && lEl != false){
           if(a){
          lEl.readOnly = true;
          lEl.style.background = '#cccccc';
        }else{
          lEl.readOnly = false;
          lEl.style.background = '#ffffff';
         return true;
    function foo(pThis)
    var lTD=pThis.parentNode;
    var nextinput=lTD.nextSibling.getElementsByTagName('input')[0];
    var nextnextinput=lTD.nextSibling.nextSibling.getElementsByTagName('input')[0];
    if (pThis.value=="CLERK") {
      ro_Item(nextinput,true);
      ro_Item(nextnextinput,true);
    else {
      ro_Item(nextinput,false);
      ro_Item(nextnextinput,false);
    </script>

  • Can you order by label of select list in tabular form?

    Imagine this scenario, you have an updateable tabular report based on a query like the following:
    select emp_id
          ,ename
          ,dept_id
    from employeesAnd you define the dept_id column as a query based lov, so you see a select list for departments.
    select dept_name d
          ,dept_id   r
    from departments
    order by 1However if the user chooses to order by the department column by clicking on the heading to sort, they see the following order (note the H between A & B):
    Accounting
    Human Resources
    BiodiversityWhich is because of the ID not being in the same order as the label
    1 - Accounting
    3 - Biodiversity
    2 - Human ResourcesHow can I allow the user to order by the lov based column, but have it order by the label and not the reference id?
    A colleague reckons she fought and lost this battle. Surely this must be a common issue? I can't seem to find any related questions.
    Cheers,
    ScottWe.

    >
    Option B: Convert to manual tabular form. Here is a sample of the report query (leave column display as at "standard report column").
    select e. emp_id
          ,e.ename
          ,'&lt;input type="hidden" value="'||d.dept_name||'" /&gt;'||APEX_ITEM.SELECT_LIST_FROM_QUERY(3,e.dept_id,'select dept_name ,dept_id  from departments order by 1') dept
    from employees e, departments d
    where e.dept_id = d.dept_idI recently had problems when I had to apply a script to a page that used this technique: basically too many <tt>input</tt>s. Never understood why this element is used&mdash;guess it's the fact that it's "hidden". Anyway, an HTML comment works as well and is more out of the way:
    select e.empno
          ,e.ename
          ,'<!-- '||d.dname||' -->'||APEX_ITEM.SELECT_LIST_FROM_QUERY(3,e.deptno,'select dept_name ,dept_id  from departments order by 1') dept
    from emp e, dept d
    where e.deptno = d.deptno

  • Cascade Select list with Tabular Form

    Hi,
    I am trying to implement Cascade Select List functionality on a tabular form where users should be able to add multiple rows. The data should be saved to a temporary stage area, where users can review the data prior to saving to the table. Very similar to the shopping cart where one can Delete/Update rows by record. I believe there is a way to do it via APEX Collections. If anyone has an example it would definitely help. FYI, Running on APEX 3.2, so no built in cascade functionality.
    Thank you,
    Chandu

    If you received a reply or figured out how to do this, can post? I need to implement exact same functionality and have not figured out how to do so. Have pinged Denes K. for source code on his demo app but not yet received response. Can this be done using wizard tab form or does it have to be a manually tab form?

  • Help with Cascading Select List in Tabular Form

    Hello Friends,
    I am trying to implement Denes Kubicek's sample for Cascading Select list and ran into this error:
    Please help me identify what I might have missed ???
    <code>
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Only one top level element is allowed in an XML document. Error processing resource 'http://apex.oracle.com/pls/apex/f?p=12...
    <select><option value="0">- Select Employee (0) -</option></select><html lang="en-us" xmlns:htmld...
    </code>
    Please find below the list of activities I performed:
    1.Created the region source
    2.Created the hidden items
    3.Created the buttons and items
    4.Created the application process for MRU and Delete
    5.Created the Application item [ TAB_CASCADING_ITEM]
    6.Created the Application Process[tab_casc_sel_list]
    Any clue/pointers to debug this are welcome.
    I tried the above on apex.oracle.com; WS: CHAITANYAPATCHIPULUSU; USERNAME :[email protected]
    PWD:Satya123 in APPLICATION : 12855 and Page :35
    Regards..

    OK, you didn't have the background process as an on demand process.
    In the MRU and MRD process, you were referencing the wrong variables for the count. (as in deb's case, it's p176, but in your case its p35).
    In the javascript function, the call that is supposed to assign : TAB_CASCADING_ITEM a value, isn't working (I believe).

  • Multiple Select Lists on Tabular Report

    I am trying to build a tabular report to allow users to edit records within a table. This tabular report has several non-editable columns on it as well as two select list boxes. Theh user would select a value from the first list box. That value would then become part of the where clause of the next select list box. However I have not been able to pass the new value to second list box.
    My application deals with metadata, so here's how the screen looks: (Field names in {} are select lists)
    Select File to Edit: {this list works fine}
    [Field Name] [Derived] {Parent file} {*Parent Field*}
    The Parent Field drop down is never getting populated. Parent file dropdown works fine.
    I don't think the problem is with my select statement. I think the variable I am using in my select statement is never having it's value set.
    Any help would be appreciated.
    Hope this makes sense.
    Don

    there's currently no easy way to handle your request in html db. it might be doable using a few hacks here and there, but it's almost not worth getting into because of the complexity of the approach. my recommendations are that you...
    a) consider setting your form up as a single-row update rather than a multi-row one. with a single-row form, it's a much simpler matter to have your {Parent Field} lov be driven by your {Parent File} one.
    b) if the values in your Parent File lov aren't too great in number, you might consider handling this with javascript added to your tabular form page. i don't know that exact javascript, but you should be able to find it pretty easily on the web.
    hope this helps,
    raj

  • Dynamic actions in two select list

    Hi all,
    I have created two select lists.one is parent another is child.
    i can get the child list values correctly using cascading lov parent item
    Eg: parent item values company name :x,y,z etc
    x having 3 clients say a,b,c
    there is no client for y
    z having 2 clients say d,e
    now i want to hide the child item once the parent having no child.
    The moment when i select 'y' for the above example i want to hide the child item.
    How can i do that?

    Hi,
    You can do the following:
    1. Create a hidden page item, say PX_HIDE_SHOW_FLG
    2. Create a Dynamic Action of the type "Set Value" on the parent item to update PX_HIDE_SHOW_FLG. You can choose the "Set Type" as "PL/SQL Function Body". The function code should return 'Y' or 'N' based on the logic (count the number of children under the selected parent). You can trigger this DA on "change" of the parent item.
    3. Now, create another DA on PX_HIDE_SHOW_FLG to hide/show the child LOV item based on its value. For, example, if value (of the hidden page item) = 'Y', then hide, else show.
    Thanks,
    Rohit

  • Cascading Select list in tabular from

    Looked at Denes example on Cascading Select Lists - http://apex.oracle.com/pls/otn/f?p=31517:119:2294401989620845.
    Want to have the primary select list as an item in a region, then the secondary select list as
    a column in a tabular form in the same region. Is this possible?
    The Onchange event is placed in the HTML Form Element Attributes for a page item but a column on a tabular form doesn't have this.
    Can the Element Attributes or Element Option Attributes be used to hold the OnChange event code?

    On trial basis, i tried to implement code provided on [http://htmldb.oracle.com/pls/otn/f?p=31517:176:3223246187469527::NO|http://htmldb.oracle.com/pls/otn/f?p=31517:176:3223246187469527::NO]
    I have same table DEPT & EMP HAVING same data. i created application items & processes. But My tabular form display column headings & null in each column.

  • Select List field in Form not pulling correct record

    I have a report that displays a Product Name and a Host Name. Each product can reside on multiple hosts and each host has multiple products, hence an associative table with product_host_asgmt_id, product_id and host_id is defined.
    The report I created selects data from the associative table and presents the user the product names and host names without a problem. the same report has an edit link that when selected will open a form that should display the selected host name and product name. In the form both of these fields are defined as Select List. The issue is that the list shows all the LOV but does not focus on the one that was selected in the report to edit.
    I unhid the product_host_asgmt_id, product_id and host_id in the form and the values contained are correct, so I think the Automated Row Fetch is working. This same form needs to be used for editing and for creating new values hence the Select List.
    I I have the Source section of the Host_name select list field set to : Only when current session state is null and the Source Type is an SQL query selecting all host_name form the host table.
    Any ideas how to get the values selected in the report to appear in the form?
    Thanks and apologize if this is trivial. I'm a rookie Apex user (but I like it).

    When you link to the form page, I assume you are passing the host_id value into a page item. Say you pass this value into item P2_HOST_ID, just make the select list item's Source Type Item (application or page item name) and enter P2_HOST_ID in the Source field.
    This assumes that the lov query is of the form "select host_name d, host_id r from ...".
    Be careful with Source Used "Only, ..." so that you never allow the page to display with a stale and unwanted value in P2_HOST_ID or that will produce an incorrect display value in the select list.
    Scott
    P.S. Please tell us your first name and put it into your handle and/or profile to help us.

  • Can I use dynamic select list in task form?

    Hi
    If I need to chage text input in task form to select list which dynamic from some database, Can I do it? If I can, how to do its ?
    Thanks
    User520932

    If you mean that you want to change the 'outcome' list of the human task, then this is not possible.
    Marc
    http://orasoa.blogspot.com

  • Checked some items of multiple-selection list box when form loaded in infopath

    Hi
    I customize sharepoint list with infopath. I have multiple-selection list box and want to checked some items of that automatically when form loaded. how can do this?
    Thanks.

    Hi,
    According to your description, my understanding is that you want to pre-select some items in the Multiple-Selection List Box.
    I recommend to follow the steps below to achieve this goal:
    Click Default Values under Data tab in InfoPath, expand the dataFields and navigate to the Multiple-Selection List Box field.
    Set the Default Value of the Multiple-Selection List Box field.
    Right click the field under the Multiple-Selection List Box group, then select Add another Value Below and set the Default Value for this field.
    Repeat step3 based on the number of the items that you want to be pre-selected.
    More information are provided in the link below:
    http://www.bizsupportonline.net/infopath2010/pre-select-items-multiple-selection-list-box-infopath-2010.htm
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Implementing multi-select lists in Oracle Forms

    Can anyone of you please tell me how to do multi select list in forms. I used picklist.fmb from oracle demo forms but it is not working fine. If someone could provide a working form I will be grateful to them.
    My mail id is [email protected]

    Some years ago I wrote (using Forms6i) utility MSLOV for such purposes, and even wrote an article about using it, but, of course, in Russian :-)
    I successfully use it in my Web Forms6i project and also test it in C-S Forms6i and Forms9i.
    If someone interesting, I also have short english usage description.
    It will be nice to hear your comments.
    At first, you need a code, which can be downloaded from http://www.geocities.com/luzanovp/mslov.html
    At the end of article there is a link to mslov.zip. Get it.
    Compile MSLOV.fmb and MSLOV.pll
    Run demo forms: EMP_DEMO.fmb, ORD_DEMO.fmb and see how it works.
    It requires Scott's tables: emp, dept, ord, item, product. You can create these tables from demobld.sql
    Below description about how to use it.
    You can show to user only one column, actually it can be expression (so, you
    are not limited here to one database column only ).
    Specify this column/expression by label_in parameter to fp_mslov.show_lov
    For example, if EMP table contains first_name and last_name columns and
    you want to show to the user full name do this:
    IF fp_mslov.show_lov (
       label_in => 'first_name || '' '' || last_name',
    Parameter id_in - this is what will be returned to you as a developer after user
    made his choice.
    For example, you want to receive array of EMPNO:
    IF fp_mslov.show_lov (
       label_in => 'first_name || '' '' || last_name',
       id_in => 'empno'
    In some cases you need to return more that one column.
    You can specify up to five additional columns for such purposes.
    For example, you want to return not only EMPNO, but also SAL and COMM columns:
    IF fp_mslov.show_lov (
       label_in => 'first_name || '' '' || last_name',
       id_in => 'empno',
       col1_in => 'sal',
       col2_in => 'comm'
    Also, you can use expressions in place of these columns:
       col3_in => 'sal + NVL(comm, 0)'
    From which table we must query?
    How to order by or specify some conditions(Where clause)?
    Where the place for GROUP BY?
    For all these questions you must use from_clause_in parameter.
    In our example we will query emp table and want order by salary in descending
    order:
    IF fp_mslov.show_lov (
       from_clause_in => 'FROM emp ORDER BY sal DESC',
    Parameter title_in to fp_mslov.show_lov is a self documented.
    This is a title for MSLOV dialog.
    So, to invoke mslov utility, we construct such call:
    IF fp_mslov.show_lov (
       label_in => 'first_name || '' '' || last_name',
       id_in => 'empno',
       col1_in => 'sal',
       col2_in => 'comm'
       col3_in => 'sal + NVL(comm, 0)',
       from_clause_in => 'FROM emp ORDER BY sal DESC',
       title_in => 'Select employees'
    THEN
    This function fp_mslov.show_lov will return TRUE if user made selection and
    FALSE if user press CANCEL (similar to SHOW_LOV builtin).
    Now, if it return TRUE we need to process returned rows (selected by user).
    I store it in global record group.
    But to work with this record group, you can use fp_mslov package, which
    provide desired API for this purpose.
    At first, you need to declare a variable of FP_MSLOV.OUT_RECORD_TYPE type.
    Actually this is a record type declared in fp_mslov package specification.
    DECLARE
       returned_rec  FP_MSLOV.OUT_RECORD_TYPE;
    To process selected rows we need a loop from 1 to a number of selected rows.
    Such number can be received by fp_mslov.rowcount function:
    FOR i IN 1 .. fp_mslov.rowcount
    LOOP
    END LOOP;
    To return one row we can use fp_mslov.get_row function.
    FOR i IN 1 .. fp_mslov.rowcount
    LOOP
       returned_rec := fp_mslov.get_row(i);
    END LOOP;
    Now, you can do what you want with returned row.
    RETURNED_REC record has the following fields which correspond to parameters of
    the
    fp_mslov.show_lov function: id, col1, col2, col3, col4, col5
    You know that in id field will be empno column, in col1 -> sal, etc
    So, you can process them:
    FOR i IN 1 .. fp_mslov.rowcount
    LOOP
       returned_rec := fp_mslov.get_row(i);
       message('Empno: ' || returned_rec.id);
       message('Sal: ' || returned_rec.col1);
       message('Comm: ' || returned_rec.col2);
       message('Sal+Comm: ' || returned_rec.col3);
    END LOOP;
    Remember that returned values always are varchar2 values.
    So if you need, for example, a date you need explicitly convert it to char when
    invoking
    fp_mslov.show_lov and then (after fp_mslov.get_row) convert it to date with the
    same format mask.
    For example:
       IF fp_mslov.show_lov (
          col4_in => 'TO_CHAR(hiredate, ''DD.MM.YYYY HH24:MI:SS'')',
       ... TO_DATE(returned_rec.col4, 'DD.MM.YYYY HH24:MI:SS');
    To clear memory structures which used by global record group and others
    variables,
    you need to use fp_mslov.clear procedure.
    And now all together:
    DECLARE
       returned_rec  FP_MSLOV.OUT_RECORD_TYPE;
    BEGIN
       IF fp_mslov.show_lov (
          label_in => 'first_name || '' '' || last_name',
          id_in => 'empno',
          col1_in => 'sal',
          col2_in => 'comm'
          col3_in => 'sal + NVL(comm, 0)',
          from_clause_in => 'FROM emp ORDER BY sal DESC',
          title_in => 'Select employees'
       THEN
          FOR i IN 1 .. fp_mslov.rowcount
          LOOP
             returned_rec := fp_mslov.get_row(i);
             message('Empno: ' || returned_rec.id);
             message('Sal: ' || returned_rec.col1);
             message('Comm: ' || returned_rec.col2);
             message('Sal+Comm: ' || returned_rec.col3);
          END LOOP;
       ELSE
          NULL; -- User press Cancel
       END IF;
       fp_mslov.clear;
    END;

  • Two select box in a form in JSP...Save me...Please

    Hi,
    My jsp page has one form with two different select/option. One select is fbox and another is tbox. tbox contains master values from db and fbox contanis some/few/no values from db.(It might be empty.) Now, I want to add a value from tbox to fbox. If that value is already in fbox then ALERT otherwise add in that value in fbox. Following is the code for that.
    Would somebody help me out ? I don't know what's wrong with this code. It's not working............It's kind of serious and urgent.
    function add(fbox,tbox) {
    var i = 0;
    if(fbox.value != "") {
    var no = new Option();
    for(var i=0; i < tbox.options.length; i++)
    if((fbox.value == tbox.options.value) || (fbox.value == tbox.options[i].text))
    alert("Value is already added. Select another item.");
    break;
    else
    no.value = fbox.value;
    no.text = fbox.value;
    tbox.options[tbox.options.length] = no;
    fbox.value = "";
    else
    alert("Please enter an item.");

    Hi Srinath or anybody,
    Would u pl. tell me what's wrong with following code ? Javascript prompt is not invoking....U can see/find javascript function addservice(service) in my code which is called by JSP code inside in my form...
    I am using Tomcat 3.3, Jdeveloper 3.2, IE 6.0 and Netscape 7.0.
    I am badly working on this but Javascript prompt is not working....
    Thanks for ur time and help...
    Waiting for ur reply.
    David
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <%@page language= "java" import= "java.sql.*,sun.jdbc.rowset.*,javax.servlet.http.*,java.lang.reflect.*,java.io.*,java.util.*,javax.servlet.*"
    errorPage="error.jsp" %>
    <jsp:useBean id="conn" class="package1.connectionBean" scope="session"/>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=WINDOWS-1252">
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    </HEAD><center>
    <BODY>
    <script language="javascript" SRC="FormChek.js"></script>
    <script language="javascript">
    function CheckFstock(ftock) {
    var Gooddigit = "0123456789";
         if (document.formtest.ftock.value.length > 3 )
              alert('Invalid Stock ! Please re-enter with less than equal to 3 digits.');
              return false;
         }// if ends
    function CheckPostal(postal) {
         var valid = 1;
         var GoodChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
         var Gooddigit = "0123456789";
         var Goodextrs = "- ";
         var i = 0;
         if (document.formtest.postal.value == "")
              // Return false if number is empty or length is not 7 length is not 6
              alert('Invalid Postal Code ! Please re-enter now.');
              valid = 0;
    document.formtest.postal.focus();
              return false;
         }//if ends
         else if(document.formtest.postal.value.length == 7)
              //alert (GoodChars.indexOf(document.formtest.postal.value.charAt(0)));
              for (i =0; i <= document.formtest.postal.value.length; i++)
                   //alert( i + "->"+ document.formtest.postal.value.charAt(0))
                   if ((GoodChars.indexOf(document.formtest.postal.value.charAt(0)) == -1) || (GoodChars.indexOf(document.formtest.postal.value.charAt(2)) == -1) || (GoodChars.indexOf(document.formtest.postal.value.charAt(5)) == -1))
                        alert("Not Valid Chacters in entered Postal Code! Please re-enter now.");
                        valid = 0;
    document.formtest.postal.focus();
                        return false;
                   } // if ends
                   if ((Gooddigit.indexOf(document.formtest.postal.value.charAt(1)) == -1) || (Gooddigit.indexOf(document.formtest.postal.value.charAt(4)) == -1) || (Gooddigit.indexOf(document.formtest.postal.value.charAt(6)) == -1))
                        alert("Not Valid digits in entered Postal Code! Please re-enter now.");
                        valid = 0;
    document.formtest.postal.focus();
                        return false;
                   } // if ends
                   if (Goodextrs.indexOf(document.formtest.postal.value.charAt(3)) == -1)
                        alert("Not Valid extras in entered Postal Code! Please re-enter now.");
                        valid = 0;
    document.formtest.postal.focus();
                        return false;
                   } // if ends
              } // for ends
         }// else if ends
         else if(document.formtest.postal.value.length == 6)
              for (i =0; i <= document.formtest.postal.value.length; i++)
                   if ((GoodChars.indexOf(document.formtest.postal.value.charAt(0)) == -1) || (GoodChars.indexOf(document.formtest.postal.value.charAt(2)) == -1) || (GoodChars.indexOf(document.formtest.postal.value.charAt(4)) == -1))
                        alert("Not Valid Chacters in entered Postal Code! Please re-enter now.");
                        valid = 0;
    document.formtest.postal.focus();
                        return false;
                   } // if ends
                   if ((Gooddigit.indexOf(document.formtest.postal.value.charAt(1)) == -1) && (Gooddigit.indexOf(document.formtest.postal.value.charAt(3)) == -1) && (Gooddigit.indexOf(document.formtest.postal.value.charAt(5)) == -1))
                        alert("Not Valid digits in entered Postal Code! Please re-enter now.");
                        valid = 0;
    document.formtest.postal.focus();
                        return false;
                   } // if ends
              } // for ends
         }// else if ends
         else { alert('Postalcode is not 7 or 6 charactres long ! Please  re-enter now.');
    document.formtest.postal.focus();
    }//else ends
         return valid
    }//this function ends
    function goback() {
    history.go(-1);
    function addItem(fbox,tbox)
    var boxLength = tbox.length;
    var selectedItem = document.formtest.list1.selectedIndex;
    var selectedText = fbox.options[selectedItem].text;
    var selectedValue =fbox.options[selectedItem].value;
    var j;
    var isNew = true;
    //alert('BOx Length is : ' + boxLength);
    if (boxLength != 0)
    for (j = 0; j < boxLength; j++)
    thisitem = tbox.options[j].text;
    if (thisitem == selectedText)
    isNew = false;
    alert("Selected value is already available. Please select a different item");
    break;
    if (isNew)
    newoption = new Option(selectedText, selectedValue, false, false);
    tbox.options[boxLength] = newoption;
    fbox.selectedIndex=-1;
    function remove(box) {
    if (confirm("Are you sure you want to delete. Continue?")) {
    for(var i=0; i<box.options.length; i++) {
    if(box.options.selected && box.options[i] != "") {
    box.options[i].value = "";
    box.options[i].text = "";
    BumpUp(box);
    function BumpUp(abox) {
    for(var i = 0; i < abox.options.length; i++) {
    if(abox.options[i].value == "") {
    for(var j = i; j < abox.options.length - 1; j++) {
    abox.options[j].value = abox.options[j + 1].value;
    abox.options[j].text = abox.options[j + 1].text;
    var ln = i;
    break;
    if(ln < abox.options.length) {
    abox.options.length -= 1;
    BumpUp(abox);
    function Moveup(dbox) {
    for(var i = 0; i < dbox.options.length; i++) {
    if (dbox.options[i].selected && dbox.options[i] != "" && dbox.options[i] != dbox.options[0]) {
    var tmpval = dbox.options[i].value;
    var tmpval2 = dbox.options[i].text;
    dbox.options[i].value = dbox.options[i - 1].value;
    dbox.options[i].text = dbox.options[i - 1].text
    dbox.options[i-1].value = tmpval;
    dbox.options[i-1].text = tmpval2;
    function Movedown(ebox) {
    for(var i = 0; i < ebox.options.length; i++) {
    if (ebox.options[i].selected && ebox.options[i] != "" && ebox.options[i+1] != ebox.options[ebox.options.length]) {
    var tmpval = ebox.options[i].value;
    var tmpval2 = ebox.options[i].text;
    ebox.options[i].value = ebox.options[i+1].value;
    ebox.options[i].text = ebox.options[i+1].text
    ebox.options[i+1].value = tmpval;
    ebox.options[i+1].text = tmpval2;
    function dosubmit() {
    for ( var i = 0; i < document.formtest.list2.length; i++ )
    document.formtest.list2.item(i).selected = true;
    for ( var i = 0; i < document.formtest.service.length; i++ )
    document.formtest.service.item(i).selected = true;
    function addservice(service) {
    var defaultSelected = true;
    var selected = true;
    //alert('Here');
    var input_box = prompt("Enter some text","");
    //alert(input_box);
    if(input_box != "")
    var optionName = new Option(input_box,input_box,false,false);
    var length = service.length;
    service.options[length] = optionName;
    else
    alert("Service should not be empty ! Write Something.");
    </script>
    <form name="formtest" METHOD="POST" onSubmit="dosubmit()">
    <% String sql;
    sql = "SELECT LINEID, DESCRIP from PURCHVENDOR.AUTOLINE";
    ResultSet results = conn.executeQuery(sql);
    %>
    <TABLE BORDER="1">
    <TR>
    <TD>Code/Type</TD>
    <TD><INPUT TYPE="TEXT" NAME="vcode" SIZE="38">
    <select name="tp">
    <option value="S">Standard</option>
    <option value="A">Aftermarket</option>
    </select>
    </TD>
    </TR>
    <TR>
    <TD>Vendor Name</TD>
    <TD><INPUT TYPE="TEXT" name="vname" SIZE="54"></TD>
    </TR>
    <TR>
    <TD>Contact Name</TD>
    <TD><INPUT TYPE="TEXT" name="cname" SIZE="54"></TD>
    </TR>
    <TR>
    <TD>Address</TD>
    <TD><INPUT TYPE="TEXT" name="address" SIZE="54"></TD>
    </TR>
    <TR>
    <TD>P.O.Box</TD>
    <TD><INPUT TYPE="TEXT" name="POBox" SIZE="54"></TD>
    </TR>
    <TR>
    <TD>City</TD>
    <TD><INPUT TYPE="TEXT" name="city" SIZE="54"></TD>
    </TR>
    <TR>
    <TD>Province/Postal</TD>
    <TD>
    <INPUT TYPE="TEXT" name="province" SIZE="25" onChange="checkStateCode(this)">
    <INPUT TYPE="TEXT" name="postal" SIZE="25" onChange="CheckPostal(this)"></TD>
    </TR>
    <TR>
    <TD>Phone Number</TD>
    <TD><INPUT TYPE="TEXT" NAME="pnumber" SIZE="54" onChange="checkUSPhone(this)"></TD>
    </TR>
    <TR>
    <TD>Fax Number</TD>
    <TD><INPUT TYPE="TEXT" name="fnumber" SIZE="54" onChange="checkUSPhone(this)"></TD>
    </TR>
    <TR>
    <TD>Fee Stock/Factory</TD>
    <TD><INPUT TYPE="TEXT" name="ftock" SIZE="25">
    <INPUT TYPE="TEXT" name="ffactory" SIZE="25">
    </TD>
    </TR>
    <TR>
    <TD>Prefered Vendor</TD>
    <TD><input type="radio" value="1" name="choice" Checked>Yes
    <input type="radio" value="2" name="choice">No
    </TD>
    </TR>
    <TR>
    <TD>Line Carried</TD>
    <TD><select multiple size="5" name="list1" >
    <%
    while(results.next())
    %>
    <OPTION value = "<%= results.getString("lineid")%>"><%= results.getString("lineid")%></OPTION>
    <%
    %>
    </select>
    <input type=button value="Add" onclick = "javascript:addItem(this.form.list1,this.form.list2);"</input>
    <select multiple size="5" name="list2"></select>
    <input type=button value="Delete" onclick = "javascript:remove(this.form.list2);"</input>
    </TD>
    </TR>
    <TR>
    <TD>Service</TD>
    <TD>
    <select multiple size="5" name="service"></select>
    <input type=button value="Add Service" onclick = "addservice(formtest.service);"</input>
    <input type=button value="Delete Service" onclick = "javascript:remove(this.form.service);"</input>
    </TD>
    </TR>
    </TABLE>
    <P><INPUT TYPE="SUBMIT" VALUE="Add" onClick="document.formtest.action='addvpdb.jsp';"</input>
    <INPUT TYPE="SUBMIT" VALUE="Cancel" onClick="document.formtest.action='vendormain.jsp';"</input>
    <!-- <INPUT TYPE="SUBMIT" VALUE="Cancel" onClick= "goback()"</input> -->
    </P>
    </center>
    </form>
    </BODY>
    </HTML>

  • Tabular Form : Select list : onchange event

    I need a method / example to apply an Onchange event to a Select List in Tabular form.
    Whenever an item from the select list is selected, the data from other column of the same or different Table should get displayed,
    in a Textfield of the Tabular form.
    Yogesh

    Hi,
    Here is one example
    http://apex.oracle.com/pls/otn/f?p=31517:176
    Br, Jari

Maybe you are looking for

  • Error in backup with verification in DB13

    Dear all, I am taking backup through DB13. There is two options in that with verification & without verification. when i am taking backup without verification , it is completed succesfuly, but when i am taking backup with verification, there is some

  • Hard Drive Replacement - Installing Recovery Discs

    Hard drive crashed. Bought a new seagate 500g and installed. Ordered recovery discs for win 7 from lenovo. Four discs received - 1) startup recovery 2) operating system 3) drivers and applications 4) additional recovery disc. I power up the pc with d

  • Outlook Online Archive Requesting for Authentication

    I am currently performing a migration from Exchange 2010 to Exchange 2013. For the new Exchange 2013 environment I have 3 servers.  Two servers are in the main site and one in the disaster site. The first server in the main site and the one in the di

  • AK Regions download

    Hi, I am trying to download the custom region which is created in AK Repositoy using the following command: java oracle.apps.ak.akload apps apps THIN "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.0.10.180)(PORT=1527))(CONNECT_DATA=(SID=DEV)))" DOWNLO

  • Client Notification Issue

    Hoping someone can point me in the right direction here. Infrastructure: SCCM 2012 R2 CU1: Single Primary Site Server (Server 2012 R2 Update), With MP Role Remote SQL 2012 Server (Server 2012 R2 Update) Second Standalone MP (Server 2012 R2 Update) HT