Conditional Validation on Textfield(s) based on Select/List - help needed.

Hey Gang,
I have a simple page where a select/list menu with values "1" through "5" determines how many following textfields require validation. There is an "onchange" event which calls a function to update the validation. Below is my code:
[ body tag *spry js/css scripts are called in head]
<form id="form1" name="form1" method="post" action="">
  <p>
      <select name="menu" id="menu" onchange="menuFunction()">
        <option value="0" selected="selected">0</option>
        <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>
      </select>
  </p>
  <p>
    <span id="sprytextfield1"><input type="text" name="text1" id="text1" /></span><br />
    <span id="sprytextfield2"><input type="text" name="text2" id="text2" /></span><br />
    <span id="sprytextfield3"><input type="text" name="text3" id="text3" /></span><br />
    <span id="sprytextfield4"><input type="text" name="text4" id="text4" /></span><br />
    <span id="sprytextfield5"><input type="text" name="text5" id="text5" /></span>
  </p>
<p><input type="submit" name="submit" id="submit" value="Submit" /></p>
</form>
<script type="text/javascript">
<!--
function menuFunction() {
      var menuNum = document.getElementById('menu').value;
     for(i=1; i<=5; i++) {
           if(i<=menuNum) {
                eval("var sprytextfield" +i+ "= new Spry.Widget.ValidationTextField(\"sprytextfield" +i+ "\")" );
           } else {
               eval("var sprytextfield" +i+ "= new Spry.Widget.ValidationTextField(\"sprytextfield" +i+ "\", \"none\", {isRequired:false})" );
//-->
</script>
[ / body tag etc... ]
The function seems to work when it requires the validation for the textfields, but not when removing the validation. I've tried doing  eval("sprytextfield" +i+ ".destroy()"); as well without success.
I've searched through forums and could not find an answer to this (sorry if I missed it)  ... so hopefully somebody can point me in the right direction. (*I found the post w/ the link http://www.spry-it.com/examples/spry-widget-validation-generation-and-destroy/ -- however that page doesn't seem to work *Chrome)
Thanks for any help! =)
~Mike

Have a look here http://forums.adobe.com/message/2651124#2651124
If that doesn't help please come back here.
Ben

Similar Messages

  • Based on select list, i need to retrieve values in other select list

    Hi,
    am new to apex using apex3.2, i need to retrieve values in select list based on the other select list vale with out refreshing page.
    ie i have region select list and country select list,in country corresponding region country must be display but with out refreshing page.
    can you please any body guide me.
    Regards
    shashidhar
    Edited by: 871140 on Jul 7, 2011 10:34 PM

    Hi,
    you can use cascading LOV for that, i which the other LOV field will be changing depending upon the selection of other value(which is in LOV).
    http://www.inside-oracle-apex.com/oracle-apex-4-0-cascading-lovsselect-lists/
    Regards,
    Mini
    Mark Answers Promptly

  • Chart based on Select list with submit Lov problem

    Hi,
    I have one page with interactive report showing username with links, date and
    database actions.
    Another page contains one region having flash chart based on select list with submit Lov.
    The lov is created by dynamic query.
    Every time when i click the 1st page report link, the 2nd page lov is populating the value automatically. But the problem is chart displays NO DATA FOUND message though the LOV has many values.
    I don't want to display any null values so set to NO for LOV
    I tried to write Before header computation (PL/SQL Function Body) to set the lov value, but the query is displayed as such.
    I don't want to assign any static default value also as the values are dynamic for every link.
    The following is my Before header computation of Select list with submit (Item name is p11_schema). (PLSQL Function Body)
    begin
    if :p11_schema is null then
    return 'select distinct owner schema1, owner schema2 from auditing
    where access_date=' || :p11_access_date
    || ' and username=' || :p11_username
    || ' order by owner';
    end if;
    end;
    This is my chart query.
    select null link, obj_name label, sum(sel_count) "Select", sum(ins_count) "Insert", sum(upd_count) "Update", sum(del_count) "Delete" from auditing
    where username=:p11_username
    and access_date=:p11_access_date
    and owner=NVL(:p11_schema, OWNER)
    group by owner, obj_name
    Example: If there more than one records in the lov, the graph should display the 1st record. When i select another record, the chart accordingly display the selected values. But inially it should not display "NO DATA FOUND" message.
    I tried using all the combinations of computation type for the lov, SQL query ( I could not use if conditon then), PLSQL expression, PLSQL function body. But it does not work out.
    Can anyone please help me out.
    Thanks.

    Hi Scott,
    Thanks for your reply.
    I found out the solution for this problem as below.
    But i did it in different way to tackle the dynamic query wich returns more than one record using rownum always the 1st record when it is empty instead of assigning constant (static) value like '1'. And i am returning LOV itself for both null or not null condition as below.
    Declare
    q varchar2(4000);
    begin
    if :p11_schema is null then
    q:='select distinct owner schema from auditing';
    q:=q || ' where username=:p11_username ';
    q:=q || ' and access_date=:p11_access_date ';
    q:=q || ' and rownum<2 order by owner';
    Execute immediate q into :p11_schema USING :p11_username, :p11_access_date;
    end if;
    return :P11_SCHEMA;
    end;
    Thanks.

  • Report displayed based on Select List condition

    Hello,
    Any help would be appreciated.
    I have a report and a select list, P55_MISSING. The select list contains the column names in the table that the report displays.
    If I select one of the column names, I would like to display all records where that column name is null.
    The sql I have at the moment is:
    select
    "ID",
    "APPLICATION",
    "SHORT_DESCRIPTION",
    "DESCRIPTION",
    "OPC_NET_NAMES",
    "PROCESSING_SCHEDULE",
    "PROCESSING_REGULARITY",
    "PLATFORMS_INVOLVED",
    "UNIX_DIRECTORIES",
    "SOURCE_FILES",
    from "APP_METADATA"
    where :P55_MISSING IS NULL
    If I select 'source files' for example, I would expect to see 3 out of 4 records stored in the table. However, I receive the message 'no data found'.
    Any help would be great. Thank you.

    Hi
    In order to doe this you will have to use dynamic sql (so you have to change your report type to 'SQL Query (PL/SQL Function Body Returning SQL Query)').
    It would then look something like this...
    DECLARE
    l_sql VARCHAR2(32767);
    BEGIN
    l_sql := 'SELECT id,
                     application,
                     short_description,
                     description,
                     opc_net_names,
                     processing_schedule,
                     processing_regularity,
                     platforms_involved,
                     unix_directories,
                     source_file
              FROM   app_metadata
              WHERE ';
    l_sql := l_sql||:P55_MISSING||' IS NULL';
    RETURN l_sql;
    END;Sorry, I can't test this as I don't have your tables.
    Cheers
    Ben

  • Refresh classic report based on select list value selected

    hello,
    can anyone please help me out with this issue. I have a parameterized classic report based on a select list and I want to refresh this report whenever the select list value is changed. I am using oracle apex version 3.2. i just want to have a javascript function onchange event for the select list which refreshes my report whenever a value is selected.
    My select list item is p1_datastore
    select distinct datastore d,datastore r from my_table1 order by 1;
    My classic report query is
    select * from my_table2 where datastore = :p1_datastore order by last_updated_dt desc;
    ****************************************************thanks,
    orton

    can anyone please help me out with this issue.
    thanks,
    orton

  • How to display chart region based on select list in html region ?

    Hi all,
    i'm using 4.0.1.00.03 apex version,in a page i have 2 regions one is html and another one is Chart region.in html region i have a select list and button.when user sign into my application select list have some values in that page,user select's a value and clicks on the button then chart will be displayed.my query is when user first sign into my application i want to dispaly chart region when only select list is selected and clicks on the button.can any one guide me on this.
    thnx in Adv.

    Hi yann,
    thnx for ur reply,
    i have done what u have written but i didn't meet my requirement..
    let me explain what i need exactly
    as of now my application is like this..
    i have a html region in that i have select list(P6_LIST) and go button
    and chart region.
    chart query is like this..
    SELECT your_value
    FROM your_table
    WHERE your_value = :P6_LIST
    AND ...
    how it is working??
    when user sign into my application, user can see html region with 'select list and go button' and chart region with 'no data '.
    when user select a value in select list and click on go button automatically chart region will be dispalyed with chart.
    what i wanted to change is..
    when user sign into my application, user can see html region with 'select list and go button' and no chart region
    when user select a value in select list and click on go button then only user can see chart region with chart.
    plz help me how to do it.. :)
    thnx in Adv.
    Edited by: moulani on Nov 4, 2011 12:05 PM

  • Automatic population of multiselect based on select list

    Hi,
    I have an issue in populating in multiselect from the data in select list.
    Let me take an example and explain.
    I have 3 tables: Employee, Department and a linking table for employee and department.
    The select list contains employee and department is a multiselect. On selection of Employee, all the departments should be displayed and the department to which employee belongs(which is taken from the linking table) should be selected (High-Lighted). How do I do this?

    Hi,
    I am trying this on three tables…DEPT, EMP, DEPT_EMP wit a select list(P1_EMP) and a multiselect (P1_DEPT).
    Dept has two columns (ID and Deptname). It has two rows.
    DEPT
    Id |Deptname
    1. HR
    2. OPERATION
    Emp has two colums (ID and Empname)
    EMP
    Id|Empname
    1. Jason
    2. Pam
    Dept_Emp has three columns (ID, Employee ID which refers to the EMP.ID, DeptID which refers to the DEPT.ID)
    DEPT_EMP
    Id| Employeeid | DeptId
    1. 1 1
    2. 2 2
    As shown , Jason belongs to HR and Pam belongs to OPERATION.
    I have tried the following steps:
    1. OnChange of Employees drop down list(P1_EMP), I have called a javascript function.
    <script type="text/javascript">
    function getDepartments(filter, listName)
    var employee = filter.value;
    var list = document.getElementById(listName);
    var listvalue = list.value;
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=GET_DEPARTMENTS_FOR_EMP',0);
    get.add('G_EMPLOYEE', employee);
    ret = get.get('XML');
    if(ret)
    var s = ret.getElementsByTagName("select");
    if(s){
    var o = ret.getElementsByTagName("option");
    var oCount = o.length;
    list.options.length = 0;
    var i=0;
    while(i<oCount)
    var l_Opt_Xml = o [ i ];
    appendToSelect(list, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue);
    i=i+1;
    list.value = listvalue;
    if (list.selectedIndex == -1)
    list.selectedIndex = 0;
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    } else {
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    </script>
    2. The Javascipt function calls in a application process(GET_DEPARTMENTS_FOR_EMP) and I have also created an application item(G_EMPLOYEE) for the same.
    declare
    begin
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<data>');
    htp.prn('<select>');
    for rec in (
    select distinct "DEPT"."Deptname" d, "DEPT"."ID" r
    from "DEPT","DEPT_EMP "
    where " DEPT_EMP "."DeptID"="DEPT"."ID"
    and " DEPT_EMP "."EmployeeID"=:G_EMPLOYEE
    order by 1
    loop
    htp.prn('<option value="' || rec.r || '">' || rec.d || '</option>');
    end loop;
    htp.prn('</select>');
    htp.prn('</data>');
    end;
    The employee multiselect(P1_EMP), initially has a “Select employee”. Upon selecting Jason, it should show, all departments and highlight HR. The same for Pam.
    But it is showing only the departments for the employee. If I modify the application process query to show all employees in that department, how do I highlight only that employee?
    Edited by: 841762 on Mar 7, 2011 1:50 AM

  • Cascading select lists - HELP

    I keep missing something from the samples i have seen on the internet on cascading select lists
    I simple need one select list to determine the choices of another select list, Please use simple terms.
    Thanks for your help. Please need asap.

    Hi,
    OK - first you should have a hidden item on page 2 that will receive the country code (I'll stick with my example, if that's ok) - say P2_COUNTRY_CODE.
    Now create two select lists - say P2_STATE_CODE and P2_CITY_CODE.
    It helps if you ensure that the P2_STATE_CODE list is set with a default value to ensure that the list can be filtered correctly. Create a Computation, to run in the "Before Header" process point and conditional on P2_STATE_CODE being null (Condition Type: Value of Item in Expression 1 is NULL; Expression 1: P2_STATE_CODE). Set the value to a "Static Assignment" of something that won't appear in the list (eg, ZZ for strings or -1 for numerics). You can do this on the Cities list as well if you like. Both lists should be set to display null values and have something like -Select- as the null display text.
    Your States list should be created as a Select List with Submit with a List of Values based on a SQL statement:
    SELECT STATE_NAME d, STATE_CODE r FROM STATES WHERE COUNTRY_CODE = :P2_COUNTRY_CODEYour Cities list is a normal Select List with a List of Values based on a SQL statement:
    SELECT CITY_NAME d, CITY_CODE r FROM CITIES
    WHERE COUNTRY_CODE = :P2_COUNTRY_CODE
    AND (:P2_STATE_CODE = 'ZZ' OR STATE_CODE = :P2_STATE_CODE)Now, when the user selects a country from page 1, the country code is passed into P2_COUNTRY_CODE before page 2 is loaded. The default values for P2_STATE_CODE and P2_CITY_CODE are set and the lists are generated - the Cities list will display all cities for the Country selected as the States list will only show the default of ZZ and this "matches" every city in the country. Then, when the user selects an item on the States list, the page is submitted and the value for P2_STATE_CODE is updated in session. As the Cities list is based on this value, when the page is reloaded, it will be updated to filter based on the P2_COUNTRY_CODE and P2_STATE_CODE values.
    The only thing you have to ensure is that P2_STATE_CODE and P2_CITY_CODE are cleared from cache when you no longer need the page - you can do this in the branch back to page 1.
    Andy

  • Generate Report based on Select List

    Hi ,
    I have a drop down list those are the column names and a corresponding value i will enter in input text . so based on these two values how can i generate a report in Apex i am using apex 4.0.2.
    Means in where clause dropdown value will become column name and input text will become value for that column;
    Thanks
    Raghav

    This gets complicated really fast.
    I'd use an Interactive Report.
    select * from emp
    where (:P5_COLUMN_NAME='deptno' and deptno= :P5_COLUMN_VALUE)
       or (:P5_COLUMN_NAME='ename' and ename= :P5_COLUMN_VALUE)

  • Select "all" help needed with MySQL

    Hi, I am trying to create a drop down select box and all of
    it works well. Just one selection I can not get to work. I want to
    have a menu item to select all of the types at once not just one or
    a menu item that will return all of the records. I have tried the
    option value "*" but it errors. Any ideas? it is MySQL 5. Thanks,
    Shane
    <select name="vehicle_type">
    <option value="Select Vehicle Type">Select Vehicle
    Type</option>
    <option value="Coupe">Coupe - 2 Door</option>
    <option value="Convertable">Convertable</option>
    <option value="Hatchback">Hatchback -
    Wagon</option>
    <option value="Hybrid">Hybrid</option>
    <option value="Van">Minivan - Van</option>
    <option value="Sedan">Sedan</option>
    <option value="SUV">SUV</option>
    <option value="Truck">Truck</option>

    <option value="all">All</option>
    On your action page, write some code to handle it.

  • Socket Based Server/Client Program Help Needed

    Alright,
    I am making a Client/Server program.
    The idea is that, when I run the 'Server' part, it sits and listens for a connection from the Client.
    The Client writes a string to the socket, then the server, interprets the command.
    This is what I have so far.
    The Server:
    public static void main(String[] args) {
             String clientLine = null;
              Socket channel = new Socket();
              try {
                   mainWin window = new mainWin();
                   window.open();
              } catch (Exception e) {
                   e.printStackTrace();
             try{
                   ServerSocket server = new ServerSocket(8313);
                  BufferedReader reader = new BufferedReader(new InputStreamReader(channel.getInputStream()));
                 channel = server.accept();
                 clientLine = reader.readLine();
                 doCommand(clientLine);
                 reader.close();
                 channel.close();
                 server.close();
             catch(IOException ioe){
                  System.out.println("I/O Exception occurred while using the server");
         }The Client:
    public void sendCommand(String command){
              PrintStream socketWriter  = null;
              try{
                    Socket client = new Socket("127.0.0.1", 8313);
                    socketWriter = new PrintStream(client.getOutputStream());
                    socketWriter.println(command);
                    socketWriter.close();
                    client.close();
              }catch(UnknownHostException uhe){
              }catch(IOException ioe){
         }When I press the command button, it lags for a second, then does nothing.
    Does anyone see the problem?

    public static void main(String[] args) {
             String clientLine = null;
              Socket channel = new Socket(); //<-- This is connecting to where? nowhere, so initiate it to null instead.
              try {
                   mainWin window = new mainWin();
                   window.open();
              } catch (Exception e) {
                   e.printStackTrace();
             try{
                   ServerSocket server = new ServerSocket(8313);
                  BufferedReader reader = new BufferedReader(new InputStreamReader(channel.getInputStream())); //<-- Getting an input stream from nowhere?
                 channel = server.accept(); //<-- Perhaps you want to do this before you try to get the input stream from it?
                 clientLine = reader.readLine();
                 doCommand(clientLine);
                 reader.close();
                 channel.close();
                 server.close();
             catch(IOException ioe){
                  System.out.println("I/O Exception occurred while using the server");
         }

  • Select List based on other select List

    Hi
    I have 2 select lists when a selection is made in one I want the second list to be limited but when nothing is selected in the first list I want the second list to display all. Apolgies if this is really a plsql thing .
    Heres what I have so far
    if :P52_ORGNAME is null
    then
    return 'select unique surname d,id r from com_contact';
    else
    return 'select unique forename||surname d,id r from com_contact where orgname = :P52_ORGNAME order by id';
    end if;
    the else is fine but I cant get the null condition to work.
    :P52_ORGNAME is a select list where show null is yes and there is no NULL value
    thanks in advance
    Kirk

    Hi,
    you can try 2 things.
    1)try putting a null display value and keep null return value as blank. dont put any value in the default value also,and see if this works,
    2)else try putting a null return value(like BLANK) and check for that value in the condition insted of null. i.e
    if :P52_ORGNAME ='BLANK'
    then
    return 'select unique surname d,id r from com_contact';
    else
    return 'select unique forename||surname d,id r from com_contact where orgname = :P52_ORGNAME order by id';
    end if;
    Hope it works..

  • Select list need to pass a value to collect information based on a value on another page

    i have a product-detail.php page that is then sent to a cart.php i have a number of tables that are all joined and show in the statement below. the results are displayed on the detail page
    $var1_rsProduct = "-1";
    if (isset($_GET['productID'])) {
      $var1_rsProduct = $_GET['productID'];
    mysql_select_db($database_beau, $beau);
    $query_rsProduct = sprintf("SELECT * FROM beauAW13_Cat, beauAW13_products, beauAW13_Stock, beauAW13_SizeList WHERE beauAW13_products.catID = beauAW13_Cat.catID AND beauAW13_products.ProductID = beauAW13_Stock.ProductID AND beauAW13_Stock.SizeID = beauAW13_SizeList.SizeID AND beauAW13_products.ProductID = %s AND beauAW13_Stock.Stock != 0 ", GetSQLValueString($var1_rsProduct, "int"));
    $rsProduct = mysql_query($query_rsProduct, $beau) or die(mysql_error());
    $row_rsProduct = mysql_fetch_assoc($rsProduct);
    $totalRows_rsProduct = mysql_num_rows($rsProduct);
    i have a select list that needs to show the sizes.this is shown below
    <select name="select" id="select">
                    <?php
    do { 
    ?>
                    <option value="<?php echo $row_rsProduct['StockID']; ?>"><?php echo $row_rsProduct['Size']?></option>
                    <?php
    } while ($row_rsProduct = mysql_fetch_assoc($rsProduct));
      $rows = mysql_num_rows($rsProduct);
      if($rows > 0) {
          mysql_data_seek($rsProduct, 0);
                $row_rsProduct = mysql_fetch_assoc($rsProduct);
    ?>
                  </select>
    it is currently passing the value of <?php echo $row_rsProduct['StockID']; ?>
    which is ok as this is a totally unique number so on the cart page i need to get all the size information from that stockID
    here is an example:-
    i have used a stockID of 355
    on the cart.php the stockID is echoed out as 355 and the size is echoed out as 355 which is what i would expect.
    the stock table looks like this
    StockID | ProductID | SizeID  |  Stock
      355   |    582    |   14    |    5
    so
    ProductID is blue jumper
    Stock id is unique number
    SizeID = 14 = once size
    Stock = 5 in stock
    so i need to in the cart say
    355 = 14 = one size
    i can then echoe out the correct size as one size and not 355
    i really hope someone can help
    thanks

    Thanks for everyone advise. I managed to get it working
    I sent the stockID on;y to the cart page, made a new variable based on the stockID the made a query and got all the information based on the new stockID variable
    <?php
    $newStockID = $XCart_StockID = ${$XCName}["contents"][0][$XCart__i];
    mysql_select_db($database_beau, $beau);
    $query_rsSize = "SELECT * FROM beauAW13_SizeList, beauAW13_Stock WHERE beauAW13_Stock.SizeID = beauAW13_SizeList.SizeID AND beauAW13_Stock.StockID = '$newStockID'";
    $rsSize = mysql_query($query_rsSize, $beau) or die(mysql_error());
    $row_rsSize = mysql_fetch_assoc($rsSize);
    $totalRows_rsSize = mysql_num_rows($rsSize);
                              ?>
    select list
    <option value="<?php echo $row_rsProduct['StockID']; ?>"><?php echo $row_rsProduct['Size']?></option>

  • Cascading select list (query based) in a tabular form

    Hi,
    In my application i have two select list in a tabular form one for selecting manager_id and other for selecting employees for the selected manager_id how can i do it in apex 4.0
    thanks in advance

    Ok i will assume that you have 2 select list items called (P1_MANAGER AND P1_EMPLOYEE)
    In employee select list u need to find Cascading LOV Parent Item(s) and set it to P1_MANAGER. Ofc your sql query must be smth like this:
    SELECT employee_name d, employee_id r FROM employee_table WHERE employee_manager = :P1_MANAGER

  • Ajax code help for conditional select list.

    Hi,
    I am using AJAX code for the first time, I dont have knowledge in java, I just grabbed the code from this forum and trying to manipulate to my requirement.
    My Requirement is I have two select lists, 1) host_name and 2) database_name.
    As soon as I pick/choose the value in host_name select list, I need to populate only those databases on that particular host. I dont want to submit the page for this action.
    Here is the code, I appreciate if some one can help.
    On demand Application Process code:
    declare
    l_counter number;
    l_o_name varchar2(2000);
    begin
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<select>');
    for rec in (select "ORA_DATABASES_VW"."DATABASE_NAME" as "DATABASE_NAME",
         "ORA_DATABASES_VW"."DB_ID" as "DB_ID"
    from "ORA_DATABASES_VW"
    where "ORA_DATABASES_VW"."HOST_NAME" = :TEMP_ITEM)
    loop
    htp.prn('<option value="' || rec.db_id || '">' || rec.database_name || '</option>');
    end loop;
    htp.prn('</select>');
    end;
    HTML Header on that page:
    =================
    <script language="JavaScript1.1" type="text/javascript">
    function get_List_XML (source_item,target_item){   
    var v_Target = html_GetElement(target_item);
    var v_Source = html_GetElement(source_item);
    var ajaxResult = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=POPULATE_LIST_XML',0);
    ajaxResult.add('TEMP_ITEM',source_item.value);
    var v_result_xml = ajaxResult.get('XML');
    if(v_result_xml && v_Target)
    var options_Contents = v_result_xml.getElementsByTagName("option");
    v_Count = options_Contents.length;
    v_Target.length = 0;
    for(var i=0;i<v_Count;i++)
    var v_opt_xml = v_result_xml.getElementsByTagName("option");
    appendToSelect(v_Target, v_opt_xml.getAttribute ('value'),v_opt_xml.firstChild.nodeValue)
    function appendToSelect(target_item, option_val, option_content) {  
    var v_Opt = document.createElement("option");
    v_Opt.option_value = option_val;
    if(document.all){
    target_item.options.add(v_Opt);
    v_Opt.innerText = option_content;
    }else{  
    v_Opt.appendChild(document.createTextNode(option_content));
    target_item.appendChild(v_Opt);
    </script>
    Form element attribute in the host_name column. P935_INSTANCE_DB_NAME is my page item for database_name.
    onchange="get_List_XML (this,'P935_INSTANCE_DB_NAME')"

    Here is the code, Hope I had put it correctly now.
    This is fixed now. Thanks a lot for helping out this. I have two questions.
    1) I am seeing very slowness when selecting the select list. Will these java code require much resource?
    2) I need to put this logic in many screens for many columns. So having these many application process and application items and java code, will the application performance get a hit? I know that application process are on-demand and get called only when required.
    declare
    l_counter number;
    l_o_name varchar2(2000);
    begin
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<select>');
    for rec in (select "ORA_DATABASES_VW"."DATABASE_NAME" as "DATABASE_NAME",
    "ORA_DATABASES_VW"."DB_ID" as "DB_ID"
    from "ORA_DATABASES_VW"
    where "ORA_DATABASES_VW"."HOST_NAME" = :TEMP_ITEM)
    loop
    htp.prn('<option value="' || rec.db_id || '">' || rec.database_name || '</option>');
    end loop;
    htp.prn('</select>');
    end;
    HTML Header on that page:
    =================
    <script language="JavaScript1.1" type="text/javascript">
    function get_List_XML (source_item,target_item){
    var v_Target = html_GetElement(target_item);
    var v_Source = html_GetElement(source_item);
    var ajaxResult = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=POPULATE_LIST_XML',0);
    ajaxResult.add('TEMP_ITEM',source_item.value);
    var v_result_xml = ajaxResult.get('XML');
    if(v_result_xml && v_Target)
    var options_Contents = v_result_xml.getElementsByTagName("option");
    v_Count = options_Contents.length;
    v_Target.length = 0;
    for(var i=0;i<v_Count;i++)
    var v_opt_xml = v_result_xml.getElementsByTagName("option");
    appendToSelect(v_Target, v_opt_xml.getAttribute ('value'),v_opt_xml.firstChild.nodeValue)
    function appendToSelect(target_item, option_val, option_content) {
    var v_Opt = document.createElement("option");
    v_Opt.option_value = option_val;
    if(document.all){
    target_item.options.add(v_Opt);
    v_Opt.innerText = option_content;
    }else{
    v_Opt.appendChild(document.createTextNode(option_content));
    target_item.appendChild(v_Opt);
    </script>
    Form element attribute in the host_name column. P935_INSTANCE_DB_NAME is my page item for database_name.
    onchange="get_List_XML (this,'P935_INSTANCE_DB_NAME')"
    }

Maybe you are looking for

  • How can I stop Firefox from switching to proxy setting from no proxy

    I have a Fios connection so the proxy setting is "no proxy" . Every time I close Firefox, it switches to the proxy setting button and highlights a proxy. It has just started doing this about 5 days ago after 3 years on this computer. It doesn't do it

  • OA Framework newbee - Need suggestions/advice for a new project

    Dear All, We are starting up a new "Online Forms" project which aims to move all the offline paper based forms to online forms with online approvals etc. We are still new to OA, hence looking for tips from the gurus out here. We have various forms (u

  • I cant update my iphoto from 2.0

    I try to update my iphoto but it says i dont have eligible iphoto apps. Help . I want to put pics on my ipod please HELP

  • Clearing for customers

    Hi we are working on automatic customer clearance but facing some difficulties. In OB74 what criteria i should define for clearing customers automatically. I have tried using Assignment number but that doesnot work for me. please guide.

  • Http session distributed on different servers?

    Hello. I have several webapps, running on different servers (I mean hardware servers). Say, several tomcats each runnig a webapp. Say, one of these servers is the main server and others are performing some auxillary web actions. I'd like that a clien