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

Tags: Database

Similar Questions

  • How to set the initial state to hide/show buttons on opening PDF files?

    InDesign offering a wonderful object multi-state capacity which unfortunately does not work in PDF files. It took a bit of research for me to come with this information, the UI program itself gives indications that this should work. (Why not maybe another forum of discussion.)

    So, I create an interactive PDF using buttons to hide/show specific paragraphs (which are also implemented as buttons because only the buttons and forms can be hidden or shown, AFAIK).

    I've set up a PDF created via InDesign using the six control keys and seven paragraphs - one of these paragraphs is the initial state that I want to see when the document is opened. As long as the PDF file that I create is distributed, that's how it works: an initial paragraph appears, buttons can be clicked and the stuff of Heroes appears the mark.

    However, a colleague thoughtfully saved the PDF file (so it could rename something more to his liking). When he does this, he left one of the displayed subsidiary paragraphs, rather than the initial paragraph I intended... and of course, this is the version that came out to the customer.

    Question: Is there a way to set the initial state to hide/show buttons when a PDF document is opened first, regardless of the State in which he could let or saved? I guess it's sort of ON OPEN event that would allow me to define an initial state as a safety net to the way I save the original document. Obviously, the PDF AS I DELIVER IT will pave the way, I want it, but I'm trying to overcome the appearance of the Murphy's law of a document that can be re-recorded in another State. An event which OPENED on that cure.

    Thank you.

    in this case you would have been better if you had locked the PDF file in order to prevent changes ANDS record as actions...

  • Facing problem in the multiple selection list...

    Hi Andy,.

    We are facing a problem more...

    In the selection of the Menu... Like u given a solution for dropdownlist hide which works very well... but the same logic does not work for the multiple selection list item. Why so...


    David...

    Published by: David on November 17, 2008 05:22

    Hello

    If you have added in the Page template, then the P39_BATES_DESCRIPTION will not work. As the P63_ATTRIBUTE_CLASS_CODE is not on the page, javascript will throw an error and that will stop the rest of the code to run.

    You can get javascript to test for the existence of a question of fact:

    if ($x('P63_ATTRIBUTE_CLASS_CODE')) {$x('P63_ATTRIBUTE_CLASS_CODE').style.display = 'none';}
    if ($x('P63_ATTRIBUTE_TYPE')) {$x('P63_ATTRIBUTE_TYPE').style.display = 'none';}
    if ($x('P39_BATES_DESCRIPTION')) {$x('P39_BATES_DESCRIPTION').style.display = 'none';}
    

    Andy

  • 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

  • Hide/show subforms with a click of a radio button

    I'm totally in this new and have very little idea what I'm doing.  I received my form to show/hide questions based on the click of a radio button.  My next question how do I eliminate the white space between issues where the subform of questions is "hiding" until the user clicks on the radio button?

    Thanks in advance to anyone who can help me with this!

    You can be the definition of property presence 'invisible '. Which is why this white space appears on the screen.

    Try to set the value of 'hidden', it will remove the space.

    If you use subform1.presence = 'invisible', the subform is not visible for the user but occupy space on the form.

    If you use subform1.presence = 'hidden', the subform is not visible for the user and also takes up no space on the form.

    In addition, the Page subform content type should be changed to be "cast" and the form should be saved as XML dynamic.

    You must do the following to make the dynamic shape.

    (1) file menu Goto-> properties of the form and select the default values tab change the default rendering in dynamic XML form Format

    (2) select the Preview Tab. Set the type of overview as a form 'Interactive form' and preview Adobe XML dynamic XML form

    (3) Finally, while saving the PDF select Save As Type 'Adobe Dynamic XML Form.

    Thank you

    Srini

  • 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 ;)

  • By the way Select list value to another page via report link

    Hello

    I have a page 1001 with an item from the selection list (SLI), a button (BTN) and a report (EPR).

    After selecting a value of the element of selection it s possible to click on the button.

    After clicking the report button will display the data. Report structure: ID, COL1, COL2, COL3, COD values in COL1 is the links to the page 1011.

    I managed to pass the value of a column in the report, but how to pass the value of SLI this link?

    I tried: SLI, SLI, #SLI # and & SLI... but nothing has worked.

    You have an idea?

    1013248 wrote:

    Please update your forum profile with a real handle instead of '1013248 '.

    I have a page 1001 with an item from the selection list (SLI), a button (BTN) and a report (EPR).

    After selecting a value of the element of selection it s possible to click on the button.

    After clicking the report button will display the data. Report structure: ID, COL1, COL2, COL3, COD values in COL1 is the links to the page 1011.

    I managed to pass the value of a column in the report, but how to pass the value of SLI this link?

    I tried: SLI, SLI, #SLI # and & SLI... but nothing has worked.

    You have an idea?

    Use the exact static text substitution method to reference the value of the element. This requires an end point ('.) ») :

    &SLI.
    
  • Delete in the database based on the values of the multiple selection list

    Hello

    I have a selectlist in Apex and a function in the database to make a deletion based on the value selected in the selection list.
    FUNCTION delete_batch (v_batch VARCHAR2) RETURN VARCHAR2
    IS
    BEGIN
    IF v_batch like 'M%'
    THEN
       RETURN ('A monthrun cannot be deleted');
    ELSE
       DELETE FROM so_disco_pa
       WHERE  batch = v_batch
       ;
       DELETE FROM so_batch_pa
       WHERE  batch = v_batch
       ;
       COMMIT;
       RETURN ('Batch '||v_batch||' has been deleted');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
        RETURN ('Batch could not be deleted');
    END delete_batch;
    The package is called when the user clicks on the button Delete with the rest of the process:
    BEGIN
    DECLARE
    x   varchar2(100);
    BEGIN
    x := pa_control.delete_batch (:P3_BATCH);
    :F105_MESSAGE := x;
    END;
    END;
    Now, I want to change the selectlist for a multiple-selection list to make several batches can be deleted.

    How can I change my procedure and the procedure to remove lots based on the values selected?

    Thank you

    Diana

    dianap says:
    I got this far, but only the first batch selected in the list is being deleted. The other values of selected package are not removed.

    Help please.

    Move the RETURN statement out of your loop.

  • 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
    ------------------------------------------------------------------------------

  • How to hide a button with javascript in Captivate 8?

    I need to run javascript in my project and at the same time I want to hide a button, so I can't use advanced actions.

    Why? You can insert the "Execute JavaScript" command in a fast action without any problem. And the same event that triggers the JS can trigger this combined action.

  • Point Set size dynamically the value of the corresponding select list

    Hi friends,

    Few days, before I learned a concept of change the size of the item dynamically according to the value of the selection using Jari list. I missed to ask him something (such as an extension of it).

    This is the thread

    {: identifier of the thread = 2282838}

    He produced the wonderful example below

    http://actionet.homelinux.net/htmldb/f?p=100:214:7956651650754287:NO:_

    Was that I missed in it, it possible to change the label of the element according to the selection list.

    According to the example, jari has limited the size of the element according to the selection list. Suppose that in this example if I select "China", im getting elements of different size and "India" means im get point of different size. But the labels of all the four elements are the same as

    attribute < li > 1
    attribute < li > 2
    attribute < li > 3
    attribute < li > 4

    As an extension, I need like assume that 'China' means that the label of the columns must be

    < Li > State
    < li > address
    < li > pincode
    < li > district

    If "India" is the label of the four elements must be

    < li > customers
    < Li > operators
    < li > units
    < li > provinces

    It is possible to generate different labels for the different size points, according to the value of the selection list. Since there are only four elements present in the database table.

    Brgds,
    Mini

    Hello

    Alter the table where you have point sizes and add the ITEM_LABEL column.
    Fill the column with the values you need for labels.
    Add the new column for the application process

    DECLARE
      l_sql VARCHAR2(32700);
    BEGIN
    
      l_sql := '
        SELECT item_name,
          item_size,
          item_label
        FROM demo_item_dyn_size
        WHERE lov_value = :P214_COUNTRY'
        ;
       APEX_UTIL.JSON_FROM_SQL(l_sql);
    
    EXCEPTION WHEN OTHERS THEN
      HTP.PRN('{"row":[]}');
    END ;
    

    And change something like JavaScript

    
    

    See working example
    http://ActioNet.homelinux.NET/HTMLDB/lspdemo?p=214

    Kind regards
    Jari

    Published by: jarola on 27 Sep 2011 19:39

    Corrected JavaScript.

  • problem in the multiple selection list

    Hello...

    That's my problem... We have a few values in session selection multiple list... these values are highlighted in the list... If wen I try to hide the list im unable to do? I think that its because of the session... wat shal I do nw?

    function hidelist()
    {
    document.getElementById('item_name').style.display = 'none ';
    }

    function showlist()
    {
    document.getElementById('item_name').style.display = 'block ';
    }





    David

    Hi David,

    It is difficult to know what can happen that I can't see your page - this error message indicates that javascript can not see the page element to which you are referring to.

    For example, if I make document.getElementById("ABC").style.display, but the article did a 'BCD' ID I would get this error.

    So, the first thing to check is that the list item is the ID that you think it does. Load the page and do a view Source. Find the selection list and check to see how ID attribute there. If it contains the right ID attribute, then it might be easier if you could save the page view Source and send it to me at... so I can watch it.

    Andy

  • The value of another field using the multiple-selection list

    Hello

    I have a multi select list as USER name name...
    In these cases, I select several users as For example JOHN AND JACK
    Database that should get both their email ID then fill in textarea (separated by commas)

    As I am new to apex, pls help.

    Welcome to this forum... :))

    What is your version of the database?

    If you use database 11g then you can use the following query for your condition,

    select LISTAGG(user_email, ':') WITHIN GROUP (ORDER BY user_email) from table_name
    where INSTR(':'||NVL(:PX_USERNAME,user_name)||':',':'||user_name||':')>0
    

    instead of PX_USERNAME use the name of your multi selection list.

    Use this query in your textfield.

    Thank you
    Lacombe

  • Values of the cascading select list is not displayed because the ampersand &amp; in LOV

    Hello
    I use the LOV example Denes Kubicek http://htmldb.oracle.com/pls/otn/f?p=31517:119 cascading

    and I have a problem when my ename has an & in the name. In this case no values appear in the select list cascading. The application process, I use looks like this:

    < 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 >

    What should I change to make it work?
    Jacob

    Jacob,

    What happens if you change your application process on like this:

    DECLARE
       v_ename   VARCHAR2 (200);
    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;
    

    Do you still have the same result?

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

  • Hide / Show button at the top or at the end of the form

    Hello

    I have the shape that has 2 buttons, move up and move down, which is used to move the subform upwards or downwards. I currently have to make a message appear: "the current element cannot be moved up" when the user tries to back up this article because they are already at the top of the form

    or "The current element cannot be moved to the bottom" as they are already at the bottom of the form.

    Now, I wish I had a DialogResult.Cancel depend on where the current site instead of the pop-up message.

    Can any advise please.

    Thanks in advance,

    DAO Han

    Hello

    Here is the form to the you: https://acrobat.com/#d=tO5CEU86 * 5yBXTFDilpg.

    There is script in the layout event: loan which was not necessary and this causes the loop.

    Also, I modified the structure slightly, Question number script and added a line of execEvent() to the click event of the button Add. I'd be careful to use names that can be reserved.

    Hope that helps,

    Niall

Maybe you are looking for