AJAX casacading select list (example D.Kubicek)

Hello!
I don't know guys how U managed to do work... This I my just try to do (reproduce the example on my env) and always without success... I have only two select list (not 3 as in the example)

P13_DEPTNO

SELECT d, r deptno dname
OF THE Department

OnChange = "get_select_list_xml1 (This, 'P13_MGR')"; "

P13_MGR

D SELECT ename, empno r
FROM (SELECT ename, empno, deptno
FROM emp)
WHERE deptno =: p13_deptno

Application process

BEGIN
OWA_UTIL.mime_header ("text/xml", FALSE);
HTP.p ('Cache-Control: non-cache');
HTP.p ('Pragma: non-cache');
OWA_UTIL.http_header_close;
HTP.prn ("< select >");
HTP.prn ("< option value ="' | 1 |) "" ' > ' | ' - all managers - ""
|| "< / option >".
);

FOR c IN (d SELECT ename, empno r
FROM (SELECT ename, empno, deptno
FROM emp)
WHERE deptno =: cascading_selectlist_item_1)
LOOP
HTP.prn ("< option value ="' | c.empno |) '">' || c.Ename | ("< / option >");
END LOOP;

HTP.prn ("< / select >");
END

CASCADING_SELECTLIST_ITEM_1 exists

JS:

< script >
function get_select_list_xml1 (pThis, pSelect) {}
var l_Return = null;
var l_Select = html_GetElement (pSelect);
get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
= CASCADING_SELECT_LIST1', 0);
Get.Add ('CASCADING_SELECTLIST_ITEM_1', pThis.value);
gReturn = get.get ('XML');
If (gReturn & & l_Select) {}
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for (var i = 0; i < l_Count; i ++) {}
var l_Opt_Xml = gReturn.getElementsByTagName ("option");
appendToSelect (l_Select, l_Opt_Xml.getAttribute ('value'),
l_Opt_Xml.FirstChild.nodeValue)
}
}
get = null;
}


function get_select_list_xml2 (pThis, pSelect) {}
var l_Return = null;
var l_Select = html_GetElement (pSelect);
get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
= CASCADING_SELECT_LIST2', 0);
Get.Add ('CASCADING_SELECTLIST_ITEM_2', pThis.value);
gReturn = get.get ('XML');
Alert (gReturn);
If (gReturn & & l_Select) {}
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for (var i = 0; i < l_Count; i ++) {}
var l_Opt_Xml = gReturn.getElementsByTagName ("option") [i];
appendToSelect (l_Select, l_Opt_Xml.getAttribute ('value'),
l_Opt_Xml.FirstChild.nodeValue)
}
}
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 >


So what is the problem? After selecting anything in the first SL, nothing changes in the second ;/

EDIT: Now I get JS alert with null :) there is a progress: P

PsmakR

Edited by: PsmakR @ May 26, 2009 10:15

Hello

It's actually the process code that is incorrect. It should be:

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('');
END;

The original code was "d SELECT ename, empno FROM EMP r... ». Therefore, the available fields in the loop are 'd' and 'r' not 'ename' and 'empno '. I have changed the above to delete 'd' and 'r '.

Andy

Tags: Database

Similar Questions

  • AJAX casacading select tabular list (example D.Kubicek)

    Hello!

    I know that I get you gus a little annoyed but it comes to new things and I would get it learned... For the two hours alst I've dealt with ajax tabular sl, I have reproduced example Denes succesgully, but when I tried to customize... I failed...

    I have SQL Report:

    Select
    apex_item. Hidden(1,PK) |
    apex_item.select_list_from_query (2, TABLE_NAME, 'SELECT TABLE_NAME D, TABLE_NAME R OF MMS_TABLES ORDER BY 1 CAD',' NO ',' onchange = "f_set_casc_sel_list_item (this,' | 'f03_' |)") LPAD (PK, 4, '0')) TABLE_NAME,.
    apex_item.select_list_from_query (3, COLUMN_NAME,'SELECT COLUMN_NAME D, COLUMN_NAME R FROM MMS_COLUMNS WHERE TABLE_NAME = "' |) TABLE_NAME | "', Null, null,"f03_ "| LPAD (PK, 4, '0')) COLUMN_NAME.
    apex_item. Text(4,SOURCE_SYSTEM) SOURCE_SYSTEM.
    apex_item. Text(5,LEGAL_ENTITY) LEGAL_ENTITY.
    apex_item. Text(6,RIGHT_TYPE) RIGHT_TYPE
    of MMS_RIGHTS WHERE USER_NAME =: P666_MMS_USERS

    JS:

    < script type = "text/javascript" >
    function f_set_casc_sel_list_item (pThis, pSelect) {}
    var l_Return = null;
    var l_Select = html_GetElement (pSelect);
    get var = new htmldb_Get (null, $x ('pFlowId') .value,
    = tab_casc_sel_list', 0);
    Get.Add ('TAB_CASCADING_ITEM', $x (pThis) .value);
    gReturn = get.get ('XML');
    Alert (gReturn);
    If (gReturn & & l_Select) {}
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for (var i = 0; i < l_Count; i ++) {}
    var l_Opt_Xml = gReturn.getElementsByTagName ("option");
    appendToSelect (l_Select, l_Opt_Xml.getAttribute ('value'),
    l_Opt_Xml.FirstChild.nodeValue)
    }
    }
    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 >

    Application process: tab_casc_sel_list (on request)

    DECLARE
    v_counter NUMBER: = 0;
    BEGIN
    OWA_UTIL.mime_header ("text/xml", FALSE);
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ("< select >");

    FOR c (SELECT COLUMN_NAME d, COLUMN_NAME R OF MMS_COLUMNS
    WHERE TABLE_NAME =: TAB_CASCADING_ITEM)
    LOOP
    HTP.prn ("< option value ="' | c.R |) '">' || c.D | ("< / option >");
    END LOOP;

    HTP.prn ("< / select >");
    END;

    Point of application: TAB_CASCADING_ITEM

    I learned my lesson from the previous post on AJAX sl and I checked the process = its Ok, I added the warning to the js script, but change the first SL (f02) ends with nothing, not even a null value or a string of XML document ;/ I think I missed something with the onchange event string but I do not know what... ; /

    With respect,

    PsmakR

    I think you are missing the closing parenthesis and double the quote on the end of your onchange
    Try

    select apex_item.hidden(1,PK) ||
             apex_item.select_list_from_query(2,TABLE_NAME,
                  'SELECT TABLE_NAME D, TABLE_NAME R FROM MMS_TABLES ORDER BY 1 ASC', 'NO',
                  'onchange="f_set_casc_sel_list_item(this,' || 'f03_' || LPAD(PK,4,'0')||')"') TABLE_NAME,
    
  • Cascading selection lists - does not

    I'm trying to implement the Ajax solution cascading select list of Denes Kubicek.
    [http://apex.oracle.com/pls/otn/f?p=31517:119]
    But something is wrong with my configuration.

    I created all the pieces, but for some reason it is like the
    Attribute of the HTML form element defined on my point P3_emp_dept is not called.
    OnChange = "get_select_list_xml1 (This, 'P3_emp_name');

    The two elements of P3_emp_dept and P3_emp_name selection list are defined as "Select generic list".
    For the Source, I tried the two "Always" and the "only when... sucks.
    Source type is defined as the "column of the database" P3_emp_dept and P3_emp_name respectively.

    When you fill out a blank page after choosing the P3_emp_dept, the P3_emp_name
    selection list is empty.

    When you change an existing record, if a different value is chosen for P3_emp_dept,
    the selection list for P3_emp_name still shows in the former Department employees.

    Any ideas?
    Thank you, Sue

    Sue:

    The second parameter to the function 'get_select_list_xml1' must be the name of the selection list that displays the names of the employees.
    Modify the call to this function for the 'Exchange' event handler declared to the selection list.

    onchange="get_select_list_xml1(this,'P3_EMP_NAME');"
    

    CITY

  • get the value of a selection list

    I made a request and on a page, I have a selection list filled from a list of values (made with a sql statement select).
    on the same page, I have a report made after a select statement.

    How can I did... when I select an item in the selection list in the report show me the item that is selected in the select list

    example:
    Select list: select name of EMP

    List of reports:
    Select * from emp;

    When I click on the selection list and chose a name of the employee in the report show me the first name, middle name, address and everything in emp.

    I tried to use emp.name = 'selectlist.value' and it gives me the invalid number.
    tried with the selection list with submit but still without work.

    can someone give me an ideea? How the current value of the selection list can be put in select condition of a statement or something to do all this?

    Thank you

    E-mail: [email protected]
    name: Andrei


    a quick description

    Page rendering
    Regions
    Point of view: Page (1) template body

    * Report: emp (10)

    Display: Position of the region 01

    * HTML: EMP1 (20)
    * Report: search (30)

    Elements
    Region: research

    * 10: P4_X select list


    Lists of values

    * EMP_name



    is an element of the region of report research.
    search source report is select name, address from emp;
    and the list of values is select name from emp;

    Andrei,

    Change your selection of P4_X list and make a list of selection with Submit. Now edit the report in the form query

    SELECT name, first name, address of the emp, whose name is nvl(:P4_X,name);

    I hope this helps.

    Thank you
    Manish

  • APEX Ajax cascading select tabular list

    Hello world

    We are developing in APEX 4.X.

    I went to your blog 'Denes Kubicek - ApEx Solutions', it's very interesting

    http://Apex.Oracle.com/pls/OTN/f?p=31517:176:384744492803038:

    I tried to create something as did Mr. Kubicek for an Ajax cascading select tabular list.

    In step 5, he said the rest of the code if you are applying for an account. Do we need to add a lot of code to get success?

    Is there anyone who tries to do as did Mr. Kubicek?

    Thanks in advance. Good bye.

    Eric.

    According to me, that simply send an e-mail with your name.

    To access my workspace in the future

    you will need to send me an email with your name and surname
    to the following address:

    [email protected]

    I create an account for you and you send the connection details. >

    Is this not the same as your existing question? {message: id = 10031811}

  • Select list first value problem using AJAX

    Hello

    I've implemented the list of selection in AJAX by allusion to Denes Kubicek - http://apex.oracle.com/pls/otn/f?p=31517:119:3737449055187298:NO. I have only 2 selection lists. The AJAX functionality doesn't quite work for the first selected value in the list select a first. I get not all values in second SelectList when the first value is selected in the first SelectList. It works very well for the rest of the values in the first selection list. I kept a few warning messages to debug JavaScript. I think the problem is with the function below,

    get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
    = States_In_County', 0);
    Get.Add ('F109_AJAX_COUNTY', html_GetElement (pThis) .value);
    gReturn = get.get ('XML');

    For the first value in the first list of Select, gReturn.getElementsByTagName("option").length; Returns 0.

    Hello:

    What is the value of the 'back' of the article 1st of the 1st list select? The value is compatible with the data type of the column of wl.location_id?

    CITY

  • AJAX select list with checkbox cascading

    Hello

    I point the selection and dependent check list item on a form. When a user selects a selection list value, this value must be used in the query for the checkboxes to filter this value while displaying the boxes with the AJAX implementation. any ideas are appreciated.

    Kind regards
    Surya

    Or a slightly different version:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:236

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • Slight problem of AJAX selection list, I hope...

    I probably looked at all the examples that uses AJAX to fill selection lists that are out there and eventually got a job almost completely.

    In my application, I use a form on page 23 to create a folder and then also use a form on page 22 to update a record. Two of these pages, I have 2 selection lists that use AJAX to complete each other. On my page of form creation, these two select lists display properly and correctly submit a report page.

    Now, when I click on the document I just create the homepage, I get redirected to the update (page 22) page where I just submit all items are displayed correctly except the second selection list. The second selection list displays the correct list of the elements in the selection list, not the one I had just chosen. What is shown is the first option in the selection list, no matter what I had selected when I created the folder. Always the first option display anything in my code?

    Thank you
    Deanna

    For example:

    My current output:

    P.23 (creation of registration)
    Parameters:
    : P23_CASE_NUMBER - 9999999999
    : P23_CONT_FACTOR_CATEG - driver distracted by
    : P23_CAUSES - other electronic devices

    PG.22 (update record)
    Parameters:
    : P22_CASE_NUMBER - 9999999999
    : P22_CONT_FACTOR_CATEG - driver distracted by
    : P22_CAUSES-Mobile (cell) phone (WRONG)(first option in the list)
    --------------------------------------------------------------------------------------------------------------------------------------------------

    The output that I would see:

    P.23 (creation of registration)
    Parameters:
    : P23_CASE_NUMBER - 9999999999
    : P23_CONT_FACTOR_CATEG - driver distracted by
    : P23_CAUSES - other electronic devices

    PG.22 (update record)
    Parameters:
    : P22_CASE_NUMBER - 9999999999
    : P22_CONT_FACTOR_CATEG - driver distracted by
    : P22_CAUSES-other (CORRECT) Electronic Devices


    Current code page 22 (Update Page):
    This is from the Header HTML
    ---------------------------------------------------------
    <script language="JavaScript1.1" type="text/javascript"> 
    
    function get_TASK_SELECT_XML(pThis,pSelect){
    var l_Return = null;
    var l_Select = $x(pSelect);
    var get = new htmldb_Get(null,$x('pFlowId').value,
    'APPLICATION_PROCESS=TaskXML',0);
    get.add('WORK',pThis.value);
    gReturn = get.get();
    gReturn = get.get('XML');
    
    
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option"); 
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    }
    }
    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>


    This is the application process - TaskXML
    --------------------------------------------------------
    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>');
    htp.prn('<option value="' || -1 || '">' || ' - Select-' || '</option>');

    for rec in (select cause , cause
    from cause where categ = :WORK)
    loop
    htp.prn('<option value="' || rec.cause_number || '">' || rec.cause || '</option>');
    end loop;
    htp.prn('</select>');
    end;

    Hello

    There are a number of issues here:

    1. remember that creation and editing features are on TWO different pages - when you refer to "the page is not save...". ' is in fact another page
    2. in the CHART table, you have an ID column AND a column RECNUM. You use the RECNUM column in the report link. In the CHART table, there are plenty of duplicates in the column RECNUM, which made it impossible for me to test - whenever I've created a new record that he got the same RECNUM value as an existing record, and I couldn't change then my new record as the process of "search...". ' incorrect 'more than one folder. You must use the ID column in the link, because it is unique
    3. on the selection of CAUSE list, you had a few items in quotes - I have no idea why. It was actually a good deal to do for your original problem. During the construction of the selection list, the value of the CASE is used as the VALUE attribute on the OPTION tag by enclosing it in quotes. What were you end up with is: < OPTION VALUE = '"sometext" ' > 'etc' < / OPTION >. The VALUE is, therefore, ""-an empty string. I removed the quotes from the data
    4. more importantly, as the CAUSE table made a unique ID column, this should be used as a return value for the list and therefore, the value stored on the CARD table. If you do this, you use the quotation marks if they are in some cases

    Andy

  • Newb AJAX - construction hyperlink from two selection lists

    Hi people,

    Would anyone familiar with care of AJAX to help out me? I am very new to AJAX, and I'm trying to set up a page that generates a URL hyperlink based on two input chooses. By example, if the first select statement was 'IT' and the second 'APPL' the URL to be returned would be


    http://Apex.Oracle.com/pls/OTN/f?p=28213:2:803955090371716:no:2:P2_SUPPORT_DEPT, P2_SUPPORT_TYPE:IT, APPL

    The reason for this is because I want an easy way for employees to create links in their email signatures that correspond to their assistance and group service. In this way, when a customer clicks the link in the signature of the employee these two selection lists is already selected for customer when they submit comments on this employee.

    We invite you to check what I have up here on apex.oracle.com:

    WORKSPACE: ARES_APEX
    USERNAME: ACE
    PASSWORD: h3lpf4l

    (MBDR - 28213)

    My error console JavaScript told me that two of my functions are not defined, but I know that 'change_support_type()' works is a "show_url()" I think that I probably need a lot of help.

    Thank you all for all the wonderful help that you have provided and will provide this forum. :)

    -Anton

    Published by: sleeper on August 28, 2008 12:07

    Published by: sleeper on August 28, 2008 12:29

    Hello

    You had a few problems with your javascript code.
    The one that you just had a plain error (wrong number of media which has been lifted) and the error.

    You select AJAX were working properly, but then to get the other content, you tried pulling XML reuse and analysis and the other which is excessive. He needed just to get the snippet of text and push it into the page.

    Here is your http://apex.oracle.com/pls/otn/f?p=28213:4 working page

    and here is your new code

     function change_support_type(pThis,pSelect){
        var l_Return = null;
        var l_Select = $x(pSelect);
        var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=change_support_type_page_4',4);
        get.add('P4_SUPPORT_DEPT',pThis.value);
        gReturn = get.get('XML');
        if(gReturn && l_Select){
            var l_Count = gReturn.getElementsByTagName("option").length;
            l_Select.length = 0;
            for(var i=0;i;appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)}}get = null;}
    
    function appendToSelect(pSelect, pValue, pContent) {var l_Opt = document.createElement("option");l_Opt.value = pValue;if(document.all){/* why is ie different ask bill */pSelect.options.add(l_Opt);l_Opt.innerText = pContent;}else{l_Opt.appendChild(document.createTextNode(pContent));pSelect.appendChild(l_Opt);}
    
    }
    
    function show_url(pThis, pThat){ var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=show_url',4);get.add('P4_SUPPORT_DEPT',$v('P4_SUPPORT_DEPT')); get.add('P4_SUPPORT_TYPE',$v('P4_SUPPORT_TYPE')); gReturn = get.get();     $x('drop_content').innerHTML = gReturn;get = null;}
    
    You can read more about our Ajax framework here [http://apex.oracle.com/pls/otn/f?p=11933:63]
    
    Also when developing AJAX you should use Firefox with the Firebug addon , even if your building for an IE only environment, it makes debugging AJAX and javascript issues much easier.
    
    Edited by: Carl Backstrom on Aug 28, 2008 12:56 PM 
    
  • selection list loading using the ondemand/ajax process data

    Guys,

    Ive has a selection list that has a query default LOV (select jobname d, jobid r of the work) but now iam trying to create application processes to pass new values LOV (like select ename d, empno from emp by 1 r) replacing the previous lov when a button is clicked

    any idea please?

    Apex 4.2.x

    Kind regards

    Gor_Mahia wrote:

    fac586

    good idea to use the function in the pipeline, but I really want to use ondemand/ajax call here I don't mind spending extra energy so long as its feasible

    I never mentioned in pipeline functions.

    A dynamic LOV can be created as either a static SQL query:

    select ename l, empno v from emp order by 1
    

    or in the body of a function that returns a SQL query:

    declare
    
      lov_sql varchar2(4000);
    
    begin
    
      if :foo > :bar
      then
        lov_sql := 'select dname l, deptno v from dept order by 1'
      else
        lov_sql := 'select ename l, empno v from emp order by 1'
      end if;
    
      return lov_sql;
    
    end;
    

    This will allow you to create a dynamic data source for the LOV using some logic is required. LOV options can be modified using standard dynamic action of refreshment. There is no need to create an additional On demand process or write complex AJAX code. Use declarative when possible.

    "Less code is less than bugs. Seek ways to write less code. "- Tom Kyte

  • Using AJAX code for the conditional selection list.

    Hello

    I use AJAX code for the first time, I have no knowledge in java, I got the code from this forum and try to manipulate my requirement.

    My requirement is that I have two selection lists, host_name) 1 and 2) database_name.
    As soon as I pick/choose the value of host_name select list, I need to fill in only the databases on this particular host. I don't want to send the page for this action.

    Here is the code, thank you if anyone can help.


    On request the code application process:
    -----------------------------------------------------
    declare
    number of l_counter;
    l_o_name varchar2 (2000);
    Start
    owa_util.mime_header ("text/xml", FALSE ");
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-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 ".
    of '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;

    Header HTML on this 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 >


    Attribute of the form in the host_name column element. P935_INSTANCE_DB_NAME is my page for database_name.
    OnChange = "get_List_XML (this,"P935_INSTANCE_DB_NAME").

    Feel free to mark the answers useful or correct ;)

  • The hide/show button with the AJAX selection list

    I have the button named "QUERY" and AJAX list selection page #2 'ID'. When my selection list value is 100, I would like to display the button, otherwise hide the button. I checked the session values are defined correctly for the selection list when I change the value, but the following code in one of the messages in the forum does not work. is it different for elements of AJAX?

    Added the following code to select the list - onchange = "disble_enable_button (); »

    function disble_enable_button() {}
    If x$ ('P2_ID') .value = '100'
    x True $('P2_QUERY') = true;
    for other x $('P2_QUERY') true = false;
    }

    Hello

    function disble_enable_button() {
    if ($v('P2_ID') == '100')
    $x_Show('P2_QUERY');
    else $x_Hide('P2_QUERY');
    }
    

    Mike

  • Invalid results based on the select list

    Hello
    I've set up 4 LOVs cascading in a test application. They fill each value based on the value of the parent cascading with success. My example is based on the query Ajax Denes Kubicek - Section III - for example - http://apex.oracle.com/pls/otn/f?p=31517:135:1771969688591802:NO. But I use 4 Cascading Select list not 4 text fields. My problem is that I am not able to scroll through records using the previous and next unless I select all 4 list selection of waterfall to fill the data in the record. I would like to be able to select the 1st list select then click on the search button to fill in the data of the registration for the selected value. Then use the previous and next to scroll through the data in the record. This code allows selection of cascade 4 list to keep focus when the key search selected. But the correct data are not returned if I only select 1 list select value and then click on the search button.
    //  alert('TagName=' + l_El.tagName + ' id=' + l_El.id)
                    if(l_El.tagName == 'INPUT' || l_El.tagName == 'SELECT') {
                        l_El.value = l_Value;
    Published by: Charles was October 8, 2009 07:53

    Hi Charles,

    OK - it works now.

    I made a few changes here and there. Basically, I defined by default for four '-1' lists and accounted for this through the page and processes. You had the wrong name for the last item in your function onLoad(), so I've changed that. Also notes that the question of the "closing date" must be formatted with a date MM/DD/YYYY formats to ensure that these are properly (the date of default real format came in the form DD-MON-AA, so you would have questions there if you don't stick to a single format). For each item, you can choose another value by default if it makes more sense for you, but you go through every place where the list is mentioned/used for updating the-1 for her to this new value.

    The processes themselves also tried to update the four lists as you go through the records. As the lists would not necessarily have all the values on them (you can click on search without making any selection, for example), I disabled these bits. However, you you should consider adding to the class section of THS page as new, so that the user can view all the information. The alternative would be to have all the lists display all the values unless otherwise filtered by their parent list - always feasible, but may be confused?

    Andy

  • How to set the default value in the select list to cascaded

    Hello
    I use Denes Kubicek cascade example list of selection http://htmldb.oracle.com/pls/otn/f?p=31517:119

    And I want to give cascading the selection list with a default value. So, anyway, I use this application process:

    < pre >
    BEGIN
    OWA_UTIL.mime_header ("text/xml", FALSE);
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ("< select >");
    HTP.prn ("< option value ="' | 1 |) "" > ' | '- all employees-' | ' < / option > ");"

    FOR c IN (SELECT ename, empno
    WCP
    WHERE mgr =: cascading_selectlist_item_2)
    LOOP
    HTP.prn ("< option value ="' | c.empno |) '">' || c.Ename | ("< / option >");
    END LOOP;

    HTP.prn ("< / select >");
    END;
    < / pre >

    How can I select for example empno default 1000?
    Thanks in advance.
    Jacob

    Jakob,

    In this case, your default value is

    HTP.prn (')

    However, you can set the default value in the loop as you want. You just say that is your default - first, second, third...

    In the list select ajax there's no submit and no calculation of values then I assuem your default is the punch one you wan to display when a selection list has been changed?

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • How a select list to cascaded in a table?

    Hello

    I would like to know how to create a pick list cascading tabular.

    In the screenshot next, for example, when select "2081: Alice Fan", the next filed should watch only "ID: name of the element" belongs to Alice.

    Screen Shot 2015-07-17 at 16.35.32.png

    Usually I do this simply for an article by implementing the SQL query and cascade LOV parent as follows.

    However, I can't find it in the form of tables?

    Screen Shot 2015-07-17 at 16.37.16.png

    Screen Shot 2015-07-17 at 16.37.25.png

    One can help with the solution?

    I hope that this can be done to reload partially after the first field had changed, but not to present an entire page.

    Thank you!

    Alice

    Hi AliceFan-Oracle,

    AliceFan-Oracle wrote:

    Please see application 81653, page 2 (Test in the navigation menu).

    It's the ERT_TABLE_Item.

    If 'point ERT ID' is cascaded by ERT ID,

    When select "2221" ERT ID, it takes only the concerts "2521" and "2541" at the point of the ERT ID.

    When select "2222" ERT ID, it takes only the concerts '2561"in ERT item ID.

    ID ERT and ERT tabular item ID are columns 29th and 30th.

    Check your Application-> Page 2 81653 on your instance of apex.oracle.com. I implemented the LOV cascading using the solution of Jari.

    Reference: APEX Blog of Jari: Article Cascading select list in the form of

    Here are the steps how this is implemented:

    • Edited your Page attributes-> section JavaScript-> 'Function and Variable global statement' has added the following code:
    (function($){
    
    /*** Cascading select list ***/
    $.fn.htmldbCascade=function(parent,onDemand,options){
    
      options=$.extend({
       trigger       : false,
       extrVal       : false,
       nullShow      : false,
       nullValue     : "",
       nullDisplay   : "- Select -",
       disAlias      : "DIS",
       retAlias      : "RET",
       loadingTxt    : "Loading ...",
       loadingCss    : {"width":"80px"}
      },options);
    
      return this.each(function(i){
    
       var self=$(this);
       var lParent=$(parent).eq(i);
       var lSelfVal=self.val();
       if(!lSelfVal){lSelfVal="";};
    
       if(!lParent.data("htmldbCascade")){
        lParent.change(function(){
    
         var lParentVal=$v(this);
         if(!lParentVal){lParentVal="";};
    
         $.extend(options.loadingCss,{"height":self.parent().height()});
    
         self
          .hide()
          .empty()
          .parent()
          .find("div.ui-autocomplete-loading")
          .remove()
          .end()
          .append($("
    ",{"html":options.loadingTxt,"css":options.loadingCss}) .addClass("ui-autocomplete-loading")); if(options.nullShow){ appendOpt(self,options.nullDisplay,options.nullValue); }; $.post("wwv_flow.show",{ p_flow_id:"&APP_ID.", p_flow_step_id:"&APP_PAGE_ID.", p_instance:"&APP_SESSION.", p_request:"APPLICATION_PROCESS="+onDemand, x01:lParentVal },function(jd){ var lExists=false; $.each(jd.row,function(i,d){ if(d[options.retAlias]===lSelfVal){lExists=true;}; appendOpt(self,d[options.disAlias],d[options.retAlias]); }); if(options.extrVal&&!lExists){ appendOpt(self,lSelfVal,lSelfVal); }; self .val(lSelfVal) .show() .parent() .find("div.ui-autocomplete-loading") .remove(); if(options.trigger){self.trigger(options.trigger);}; },"json"); }).data("htmldbCascade",true).trigger("change"); } }); /*** Append option ***/ function appendOpt(pThis,pDis,pRet){ pThis.append( $("
    • Edited your ERT_ITEM_ID column and added the following code to query LOV:
    SELECT NULL d,
           NULL r
    FROM   DUAL
    WHERE  1 = 2
    
    • Application G_TEMP element created in shared components-> section elements of enforcement with Protection of Session State"set to"Unrestricted ".
    • Created AJAX callback information Page at the request of GET_ERT_ITEM_ID process with the following code:
    DECLARE
      l_sql VARCHAR2(32700);
    BEGIN
      IF APEX_APPLICATION.G_x01 IS NOT NULL THEN
        APEX_UTIL.SET_SESSION_STATE('G_TEMP', APEX_APPLICATION.G_x01);
        l_sql := '
          SELECT ERT_ITEM_ID||'': ''||VENDOR_ID DIS,
                 ERT_ITEM_ID RET
          FROM   ERT_TABLE_ITEM
          WHERE  ERT_ID = :G_TEMP
          ORDER BY 1
        ';
      APEX_UTIL.JSON_FROM_SQL(l_sql);
      ELSE
        HTP.prn('{"row":[]}');
      END IF;
      APEX_UTIL.SET_SESSION_STATE('G_TEMP', NULL);
    END;
    
    • Created the dynamic action named "Set LOV cascade after refresh and onload", with the following attributes:

    Event: After refresh

    Selection type: region

    Region: Update purchase order (15)

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $("[name=f30]").htmldbCascade(
    "[name=f29]",
    "GET_ERT_ITEM_ID",{
      nullShow:true,
      nullDisplay:"- Select -"
    });
    

    Assigned items: no

    • 'Action' button "ADD a line" changed "defined by the dynamic Action. Created another dynamic action named "Cascading select list Set for the new line" with the following attributes:

    Event: click on

    Selection type: button

    Region: ADD Row

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: No.

    Code:

    apex.widget.tabular.addRow();
    $("[name=f30]:last").htmldbCascade(
    "[name=f29]:last",
    "GET_ERT_ITEM_ID",{
      nullShow:true,
      nullDisplay:"- Select -"
    });
    

    Assigned items: no

    Kind regards

    Kiran

Maybe you are looking for

  • Portege A600 - lack of temperature probes in Everest and overheating

    I have 2 identical A600.On of them display 6 temperature sensors - for example on EverestProcessorBase 1Core 2GMCH1GMCH2Hard drive On the second:ProcessorCore1Intel Core 2 processorHard drive Tip:the other is overheating, always above 80 ° C (the fis

  • Time Machine - How he manipulates iMovie library?

    Looking at turning on Time Machine with an iMovie 2 TB file.   Two questions: 1 Time Machine will perform incremental (after a full backup) in the library at the file level, if a project/event is added or changed to iMovie?   Or consider the iMovie l

  • I have a problem with unknown error code 80072EFE during windows update

    E-mail address is removed from the privacy *.

  • the Windows version was updated

    I have windows vista Home premium that came with my Vaio. I need to upgrade to windows 8. My question is if I can update my windows and use it on another PC and scrap this laptop... as long as it does not match the configuration system requirements.

  • VGA to RCA?

    I bought a RCA cable in offline mode in the hope that I could connect my laptop to my tv VGA. The cable has a vga connection I plug it into my computer and the normal CAR taken at the other end. When I plug everything I'm not mount and report on tele