Select List & Pop-up Page

Hey everyone...
I am having some trouble with passing values to and from a pop-up window. When running the application the user must select a value from a select list (which appears in every row of a query report), then another page must pop-up displaying another query report. The user then select a row from that report and the window closes, returning the values of that row.
I am able to do everything, including returning the values to the original page, except for sending values to the pop-up itself. I need to send the pirmary key value to the pop-up.
The select list is a query based LOV. In the element attributes field I have:
onchange="triggerPopUp('#TABLE_PK#');"
The syntax for triggerPopUp is the following:
<script language="JavaScript" type="text/javascript">
function onceYouPopYouJustCantStop(table_pk) {
var sendpk = table_pk;
var url;
url = 'f?p=&APP_ID.:30:&APP_SESSION.::::PK_30:'+sendpk;
w = open(url,"winLov","Scrollbars=1,resizable=1,width=320,height=600");
if (w.opener == null)
w.opener = self;
w.focus();
</script>
The window pops up, but the value of TABLE_PK is not recognized. If the function call is used in the URL for a column link it works perfectly, but I need it to happen after the select list is changed...
any help would be great...

the onchange is on the dropdown column, which is not the TABLE_PK column. I can use this.value to find the value of the drop down, but not any other column. getElementById does not work. If I use getElementById or simply #TABLE_PK# in the HTML Expression field it will give me the value. But I'm trying to place it in the Element Attributes field, which seems not to work the same way.
If I could somehow refer to the drop-down item (which is a query LOV, not an HTMLDB created item) through the element attributes, I think it would solve my problem...

Similar Messages

  • Select list / Pop up box - Read only ??

    Hi all,
    I have a select list to populate a field in an ApEx application. The select list is populated by a query on a table and as such there is no option to input any non-standard items via free text into that field - all values must be chosen from the select list.
    My issue now is that the select list is getting quite large and is really not the easiest way to select data from a list.
    A popup LOV is perfect for the searching through available values but it leaves the text box available for "free text input", allowing non standaerd data to be entered into that field.
    Is there any solution to this?

    Neil,
    You can use Validation to enforce correct entry. The approach I use is to use custom popup. See example below:
    http://www.oracle.com/technology/products/database/application_express/howtos/how_to_create_custom_popups.html
    You can set the text box's attributes to readonly="true". This will keep the textbox disabled thereby preventing free form data entry. Users will be forced to pick data from the custom popup page.
    Ravi

  • 4.2 select list on mobile page not setting session state

    Hi,
    Like I've done dozens of times in the past, I created a Select list that submits on change, and I expected session state to be updated accordingly.
    I tried this on a mobile page but session state is not updated for the item.
    Has anyone else experienced this?
    Scott

    Hi Scott,
    is it possible that you are hitting bug# 14680379 - PAGE SUBMIT ACTIONS DO NOT WORK FOR LONGER MOBILE SELECT LISTS, WHEN DEFINED TO FIRE WHEN THE SELECT LIST VALUE CHANGES
    on our Known Issues List http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-42-known-issues-1863578.html ?
    Is your select list selection displayed as native control or as popup? Can you create a test case on apex.oracle.com?
    Thanks
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • How to write a PL/SQL select list with submit page?

    Let's we need some select list that are related with each other. I wrote such a code.
    declare
    gn_start_id number := 0;
    glabel1 VARCHAR2(100) := 'Group ';
    glabel2 VARCHAR2(100) := 'Property';
    begin
    htmldb_application.g_f01(1) := 100;
    htp.p('<BR>');
    htp.p
    ( glabel1 || ' : ' ||
         htmldb_item.select_list_from_query
         p_idx => 1,
         p_value => '--Select a value--',
         p_query => 'SELECT m.vproperty, m.NMAP_PK_ID
              FROM table m
              WHERE m.ngroupid = ' || to_char(gn_start_id),
         p_show_null => 'NO',
         p_null_value => 0)
    htp.p('<BR>');
    htp.p
    ( glabel2 || ' : ' ||
         htmldb_item.select_list_from_query
         p_idx => 2,
         p_value => '--Select a value--',
         p_query => 'SELECT m.vproperty, m.NMAP_PK_ID
              FROM table m
              WHERE m.ngroupid = ' || to_char(htmldb_application.g_f01(1)),
         p_show_null => 'NO',
         p_null_value => 0)
    end;
    However, I am not able to submit page automaticly, when user select a value from the select list?
    How can I do this? Thankz

    I found such a solution.. thanks
    htp.p('</TD><TD>');
    htp.formselectopen(cname => 'v_status', cattributes => 'class="ddl" onChange="javascript:update_status(this.value)"');
    FOR rec IN cur_status LOOP
    IF rec.status_id = v_status THEN
    htp.formselectoption(cvalue => rec.status_name, cattributes => 'value="' ||
    rec.status_id || '"', cselected => 'TRUE');
    ELSE
    htp.formselectoption(cvalue => rec.status_name, cattributes => 'value="' ||
    rec.status_id || '"');
    END IF;
    END LOOP;
    htp.formselectclose;

  • Put a Select List on Page 0

    Is it possible to put a select list on page 0 so there's just one select list but it displays on every page?
    What I'm trying to achieve is this. Select "C" from the select list (A,B,C,D) on page 1. Then switch to page 2 and the select list is still set to"C" and the headers, charts and charts series using the select variable are "C". Select "D" from the select list and switch back to page 1 with the select list and all still set to "D" from page 2.
    What kind of region (on Page 0) would one use for the select list?
    Thanks, Howard

    Fateh - Thank you so much for answering.
    1) So that I can try what you said, what kind of region type (on Page 0) would I use to create the common select list? I've tried, using a couple different region types, but they don't support creating select lists--at least, "Select List" is not listed in the wizard when I go to create one. Once I get the select list created, I will try what you say.
    2) But, I'm confused by this part:
    1- Edit the branch of your page, in Action region you put:Set these items: P0_X
    With these values: &P_X.
    >
    Did you mean &P0_X.? Because I'm not sure what &P_X. is.
    Though, "&P0_X." would be strange; would it not? Why would one need to set P0_X to itself? Doesn't it already equal itself?
    3) You know, I've tried using a default value with separate select lists on each page and trying to pass a global variable between the pages. And sometimes I've used a default value to try to get this to work.
    2- just put &P0_X. in the default value of the item P0_X .But it seems to me, a default is only going to work when "P0_X" is null, so it's only going to work maybe the very first time.
    Thank you for your help! -- Howard (a newbie)

  • How to Populate table using values from a muti-select list

    I have a muti-select list in a page, the user can select some of the values from the muti-select list. How to populate a table in a process using the selected values.
    Thanks.
    XP

    XP,
    you can also have a look at the following thread.
    Re: Shuttle Control In APEX 3
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • Dynamic Select List not displaying correct value

    Hi there!
    I have a page with a dynamic repeat region.
    As I press one record I get up all the details based on id on an edit page.
    The problem is that the info that is inserted via a Select List is not displaying correct on edit page.
    All the other values are correct, also the values in the repeat region on index page,
    but the value from the Select List on edit page is just displaying the initially selected item.
    Have tried using SELECT DISTINCT in the SQL statement, but no luck.
    Any other ideas?
    Cut and paste from form:
    <select name="Vegtype" class="ProvDet" id="Vegtype" title="<%=(rsAs.Fields.Item("VegType").Value)%>">
                        <option value="Ev" selected="selected">Ev</option>
                        <option value="Fv">Fv</option>
                        <option value="Rv">Rv</option>
                        <option value="Kv">Kv</option>
                      </select>
    Recordset
    <%
    Dim rsAs
    Dim rsAs_cmd
    Dim rsAs_numRows
    Set rsAs_cmd = Server.CreateObject ("ADODB.Command")
    rsAs_cmd.ActiveConnection = MM_LabCon_STRING
    rsAs_cmd.CommandText = "SELECT DISTINCT DatoM, DatoR, DatoU, Distr, FagFelt, Felt, IntNr, Km, KontrNr, Kontrollor, Masse, MasseBK, Punkt, Resept, TestID, UserID, VegHp, VegNavn, VegNr, VegType FROM tblTest WHERE TestID = ?"
    rsAs_cmd.Prepared = true
    rsAs_cmd.Parameters.Append rsAs_cmd.CreateParameter("param1", 5, 1, -1, rsAs__MMColParam) ' adDouble
    Set rsAs = rsAs_cmd.Execute
    rsAs_numRows = 0
    %>
    Regards,
    Christian
    DWCS5 | .Asp | MS Access

    Ok, here goes the top down approach...
    In the HTML header of my page, i have this reference to a js file containing the javascript - <script src="#WORKSPACE_IMAGES#108.js" type="text/javascript"></script>
    Then in an HTML Region I have the following code to create the divs that will be shown and hidden - <div id="divREGION" class="divs">Select region to get list of countries.</div>
    <div id="divCOUNTRY" class="divs">Select country to get list of cities.</div>
    <div id="divCITY" class="divs">Select city and then press "Get Employees". </div>
    Note that these divs contain static content. You may be able to create dynamic content for these divs by creating dynamic query regions and putting div tags around the region (i havent tried this, it may require template modification).
    The select boxes have this code in the "HTML form elements attributes" - onFocus="javascript:showHideDiv(this,true)" onBlur="javascript:showHideDiv(this,false)"
    This onFocus and onBlur call the showHideDiv() function, passing in the object reference of the select box and a true/false to show/hide the related div.
    The actual javascript function that is contained in the 108.js file is:
    function showHideDiv(objThis, inBool){
         var divid = "div" + objThis.id.substring(3);
         if (inBool) {
         ShowDiv(divid);
         else {
    HideDiv(divid);
    That function in turn calls either the ShowDiv() or HideDiv() functions, depending on the true or false, passing in the ID of the div to be changed...
    function ShowDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "inline"');
    function HideDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "none"');
    Hope this helps.

  • Select list and redisplay

    I have a select list on Page 0 (so it shows on all my pages). When the users makes a selection from the list, I want to re-display the current page, passing the selected value (used in my fetch condition). I see there are several options for select list (with branch, re-direct etc.). What is the best way to do this when select list is on page 0?

    You can select ( select list with branch to a URL) .. and then specify the URL . use some hidden item to save page id on each page you want to have that list on, so that in list URL you can use that item to build the URL for that page depending on the item's value ( page id )
    Thanks,
    Sam K

  • Set select list using description

    Hi,
    I have been able to provide a value for a select list from another page when providing a code in the P6_NAME field e.g. P5_NAME_ID = &P6_NAME.
    I now need to choose an option from a select list using it's description rather than the underlying code the field is based on.
    Is this possible?
    Toby

    So if no other value has been specified already you just want the select list to have a default item already selected, right? OK, how about setting the Default Value Type for the Select List to "PL/SQL Function Body" and setting its Default to:
    DECLARE
       l_return_id number;
    BEGIN
       SELECT id
       INTO l_return_id
       FROM my_lookup_table
       WHERE description = 'Description of your default lookup value';
       return l_return_id;
    END IF;Andy

  • Reset Select List in Form With Report

    Hi,
    i have Created Form with Report Page. I have three select List on this page.
    1-Market Name Select List with Redirect
    2-Customer Name Select List with Redirect
    3-Contect Person
    when i select market Name then Respective Customer name is select In to select List Customer Name.
    When i select Customer Name Then Contact Person is Select in Select List Contect Person.
    Problem is when i select Customer Name from Select List then Contact Person comes into Contact persion Select List But the value in select List Customer Name and Market Name is not dispaly , Display Only -Select Market - and -Select Customer Name- .
    I want when i select Customer NAme From Select List then value from MArket and customer Select List should not be reset.
    How can i do this.
    Thanks
    Edited by: 805629 on Jan 26, 2011 10:45 PM

    Try 'select list with submit', not "select list with redirect". Redirect usually doesn't save the values in session state so they are lost when the page repaints.

  • Dynamic select list values ?

    Hi Marvel team.
    I hae two select lists in my page (A, B), when selecting a value in the list A, the list B must display some values based on what I have select
    in the List A.
    How can I start to di this please ?
    Thanks for any help.
    Jina.

    Hello Neelesh Shah,
    I have tried what you explain, but the select list with submit do not wotk properly,
    when selecting a value in the list, he page submit but the value of the list is the last one !
    and if I set the source user attribute at : always...... the value of the list is always null even if I select a value !!
    Is it a bug ?
    Thanks.
    Jina.

  • Updating a table with the data from the select list

    I have 2 select lists on a page...first select list displays vendor no and vendor name from the table vendor (vendor_no, vendor_name, address, city, state, zip, ph no)
    second list displays contact no and contact name from the table contact (contact_no, contact_name, email_addrs)
    i have a submit button...once it is clicked the vendor_no from the first list and the contact_no from the second list must be inserted into the third table vendor_contact (vendor_contact_no, contact_no, vendor_no) and also there must be a condition to check if the entry already exists or not...can any one tell me how this can be done...

    Why not design your page just on your third table (vendor_contact), and those fields (which will already be defined as part of that table) can be defined there as your select lists. Then make sure you have a Primary Key (or Unique Key) defined on the table to prevent duplicates.
    It makes for a much cleaner looking page, and far easier to implement as well.
    Hope this made sense and helps.
    Bill Ferguson

  • Create a select list using AJAX

    Hello,
    I saw Carl Backstrom and Scott Spendolini examples on how to use AJAX to populate a related item, based on a select list. What I'm looking for is the reversed angle.
    I have a TextItem, and I want to generate a select list based on that TextItem, something like this:
    select code, desc
    from Table
    where code like TextItem
    Is it possible with AJAX? (in the current examples I gat lost in the on demand application process – How, if possible, to render the select list using the HTP package.)
    Greatly appreciate the help
    Arie.

    Carl,
    I hope you can help with this, from reading the forum, you seem to have a lot of experience with AJAX and Application Express. I have found your examples within the forums and can not get them to work on my servers. I am on version 2, and a 10g database. I am attempting to place 4 select lists on a page. Each one (with exception from the first) will be dependent on the previous. To make is simple I have started with only 2 select lists. The first select list (p1_select1) is a list of departments. The second list (p1_select2) should populate with the users who belong to the department selected from p1_select1. I can not seem to get the second select list to load. I have attempted to follow your code as best I could, I can see on the page that it has created the xml data, however it just does not populate the second select list. Here is a summary of what I have.
    Thanks for lookin.
    Mike
    Page Regions:
    HTML: main (10)
    Region Header:
    <script language="JavaScript1.1" type="text/javascript">
    function f_Get_Data(pThis,pSelect_Source,pSelect_Target){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect_Target);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=Get_Data',0);
    get.add(pSelect_Source,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 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);
    </script>
    Items
    Region: main
    10: P1_TEXT1 Select List
    20: P1_TEXT2 Select List
    P1_TEXT1 Form Element:
    onChange="javascript:f_Get_Data(this,'P1_TEXT1','P2_TEXT2')";
    APPLICATION PROCESS "On Demand" Get_Data:
    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('<select>');
    for rec in (select ENAME , EMPNO
    from EMP where DEPTNO = :P1_text1) loop
    htp.prn('<option value="' || rec.EMPNO || '">' || rec.ENAME || '</option>');
    end loop;
    htp.prn('</select>');
    exception
    when no_data_Found then
    null;
    end;

  • Multiple Select List not returning multiple values

    I have created a Multiple Select List, and the manual says that when multiple values are selected and the page is submmitted (I'm using a GO button), the multiple values are put into the ITEM field, separated with a colon . However, whenever I select multiple entries in my list, it only ever returns a value for the first item (like a single select list).
    Does anybody know what I may have missed ? I'm still fairly new to this stuff, so I'm hoping it's fairly simple!
    thanks.
    p.s I'm using a dynamic list of values.

    Andy / Scott,
    Sorry, please bear with me ... still new to this.
    I have a multi select list item in page 2, called P2_MULTI_LIST. When the page is submitted, I no longer physically pass it to page 3, but how would page 3 pick up the value ? Do I need to set up a P3_MULTI_LIST item in page3 and set that item to the P2_MULTI_LIST value, or do I reference P2_MULTI_LIST directly in my Page3 SQL query ?
    Also, if I then want to propogate the value in P2_MULTI_LIST down to another page from page3, via a link in a report, is this possible ?
    thanks
    Tim

  • Select list with Submit

    I read that this control is supposed to set the request variable to the name of itself on submit.
    If that's the case, how come my 'Before Header' and 'On Submit' processes are not executing even when they have been set to being conditional on the request being P30_MY_SELECT_LIST_NAME?
    Alternatively, unconditional processes that print HTMLDB_APPLICATION.G_REQUEST are showing that variable as empty both before and after the page has reloaded.
    Any ideas on this appreciated!
    Ben

    See
    http://htmldb.oracle.com/pls/otn/f?p=24317:91
    change the select list. The page is submitted and an after-submit process conditional on request=P91_SELECT is fired (as you can see in the process success message when the page branches back to itself)
    set the request variable to the name of itself on submit."on submit" is the key here. That part works fine as I demonstrate above.
    When the page branches back to itself, it is a new SHOW (page render) request and the previous REQUEST is not remembered. If you would like this to be remembered, you need to pass the after-submit request back via the Branch attributes page. (I demonstrate this on my example page as well, you will see 2 success messages when the page refreshes, one from the after-submit process and another from the subsequent onload process, both conditional on REQUEST=P91_SELECT)
    Hope this helps.

Maybe you are looking for