Disable a button based on a condition

Hello

I want to disable a button based on some condition.
Suppose I want to disable a particular button, if the value of ACTIVE_FLAG in a table "Y".

I put disabled = true in the attributes of the button, but I don't know where to put the condition.

Thank you
Deepak

Deepak,

Put this in the footer text.


Make sure you have set the source of the item as "always replace.." for P1_ACTIVE_FLAG point and get the value from database.

See this link for the Javascript API of APEX

See you soon,.
Hari

Published by: Hari_639 on October 30, 2009 12:45

Tags: Database

Similar Questions

  • How to enable or disable a paragraph based on a condition in the BIPS

    Hello reading,
    <? country? >
    How to display a line based on a condition in the DARK...
    I have a tag as a country that has the value zero or in India, I shouldn't show paragraph
    para should be included
    and also, I don't want the line below to access his location

    How can I do this...
    pls help

    I sent you the code to achieve this. Take a peek inside.

    Thank you
    BIPuser

  • Enable and disable the item based on the Condition

    Hi Experts,

    I work in the form of 10g, I conditionally.

    I have the block master detail.

    Master block contains sub elements.

    CUSTOMER

    Address (read only) - no database element

    PRODUCT GROUP (read only) - no database article

    Note: The CUSTOMER is LOV, when I select the customers, I'm failing address and product group.

    Block detail contains sub elements.

    DATE OF START OF BLOCK

    DATE OF END OF BLOCK

    REASON

    Note: when I opened form all fields of retail blocks are enabled

    Requirement:

    1. when I created new record, at the time where I select the customer name, Bill and product group will be by default, in the block of detail - I want to activate and deactivate the block start date based on the value of the product group.

    2 if I erase block master, I need to activate the block_start_date like back when the new form is opened

    3. when I search the data also, block start date must be enabled and disabled based on the value of the product group.

    Could someone help me the best approach to achieve so that she will have no side effects.

    Thank you

    801619 wrote:

    Hello

    Thank you for your response... I have tried code trigger after change of category of products below.

    If: blockname.product_group = "Aviation" then

    set_item_property ('block.block_start_date', enabled, property_false);

    On the other

    set_item_property ('block.block_start_date', enabled, property_true);

    end if;

    1. it is disable the Group field when I put the cursor inside if the product category is "Aviation", but I want it to be automatic at a time where it will default to the value of product category.

    2. If the master clear record, is not allowing return product group

    3 suppose that if enter new record category of products "Aviation", once I put the cursor inside, it's debilitating, let's say if I erase the main recording without saving the changes, it not again allows the Group of products, it is now status (disable) previous.

    4. in query mode, it is not disabling or enabling from a group of products.

    Help, please.

    Thank you

    Ok.

    1. put your code on this trigger after changing point that fills the default value in the product category.

    2. remove the trigger after change of product group.

    3 put the same code to trigger once - new - Record - Instance of the main block.

    Hope this helps

    Hamid

  • Disable the button of the model

    Hello

    I m using Oracle 11 g and Apex - 4.0.2 version

    I m having a request to disable the button of the model based on the condition.

    Model name of the button 'enable '.

    Click the button for the first time he would execute a process and then it should disable the buttons.

    Is this possible?

    Kind regards

    VK.

    Hello

    When you inspect your via firebug or chrome or any other Inspector HTML button element, you see nay ID of the button? or button name?

    If so, you can use the jQuery selector by: #BTN_ACTIVATE (BTN_ACTIVE is the ID of the button) or [name = 'BUTTON_NAME'] is used instead of code name attribute here.

    You can choose the first option...

    First try a simple test with dynamic action like that.

    DA: Event: click on

    Selection type: jQuery Selector

    jQuery Selector: #BTN_ACTIVATE (or [name = 'BUTTON_NAME'])

    As a true action defined only the encrypted messages alert. If the message appears, the selector is written OK. If not try looking at the jQuery selectors

    Don't forget to put the when click the option button - send page by default.

    concerning

    J

  • Apex - disable the button using PL/SQL code

    Hi all

    I use a PL/SQL code to get a DB value, depending on the value that I need to disable the buttons on the Page.

    I tried code below

    IF : P2_FLAG == ' not THEN

    HTP.script ("document.getElementById ("SUBMIT") .disabled = false;", "Javascript");

    END IF;

    It is said screw the page saying - the/apex/f requested URL was not found on this server

    I use Apex 5.0, please need your contributions.

    Hello

    However, if you want to show/hide the button, you can use conditions:

    Open the properties of the button and put Conditions such as "Item = value '.

    Point - P2_FLAG

    Value - N

    To turn on or off, you must run ajax with jquery to get the DB value before charge and then print button.

    It may be useful

    Sunil Bhatia

  • Application of different function to a button based on which image it is

    Hello

    I'm working on this presentation where I next and Back button

    Under normal conditions, Net button will take the user to the next section, but in some settings, I some pop-up windows which must be loaded before the user can move out of this framework.

    I'm developing this logic to bypass same listener events to mouse, but different function applied when necessary.

    I am very new to AS3 no indication on this matter would be much appreciated in making this code work.

    You could put a conditional or pass to the event handler function that takes action based on the currentFrame property.

  • Enable and disable the buttons depends on the connection of the user?

    How to enable and disable the buttons depends on the connection of the user?

    In fact I have a few buttons as remove, add, save, exit, it etc., zero page...

    depends on the user , I have to turn on and off specific keys.


    Thanks and respect,
    SKUD.

    Hi Skud,

    In fact Jeff's response are correct and handles the problem. I want to mention another way,

    Change the desired button > navigate to Conditions > Pick (exists SQL query returns at least one row) > Expression 1, enter code similar to the following:

    Select TOP (: app_user) where double UPPER(:app_user) in ('FATEH","MARY")

    Best wishes
    Fateh

  • Disable the item based on a different value of items

    Hello, I am trying to disable an element based on the value of another, and I'm not sure what I'm doing wrong.

    I have in the header section of HTML form:

    < script type = "text/javascript" >
    function disFormItems (item1) {}
    disItem = document.getElementById (item1);
    disItem.style.background = "#eeeeee";
    disItem.disabled = true;
    }
    < /script >


    In the foot of the region, when I had the bottom it works.
    < script type = "text/javascript" >
    {disFormItems ('P19_RETURN_TO_CUSTOMER')}
    < /script >

    When I try to add my condition, nothing happens.
    < script type = "text/javascript" >
    IF ("P19_FILE_STATUS" = "A")
    {disFormItems ('P19_RETURN_TO_CUSTOMER')}
    < /script >

    Why don't you use:
    $f_DisableOnValue (pThis, pValue, pThat)
    Checks the value (pValue) of an element (pThis). If it matches, this feature disables the element or the array of items (pThat). If it does not, then the element is activated.

    so in your case: $f_DisableOnValue ('P19_FILE_STATUS', 'A', 'P19_RETURN_TO_CUSTOMER');

  • HOWTO disable a button within the APEX?

    This may seem like APEX for Dummies, but I currently have a problem with presenting a plain old HTML in the APEX in mode button disabled (not clickable). In HTML, this is no problem when you use 'disabled', but in the APEX, it does not work because the apex"disabled =" off "disabled".

    1. How can I display the button in a status of "disabled" in the APEX?

    2. How can I dynamically determine whether the button should be displayed as disabled or not?

    Any help is appreciated.

    Hello

    I did something very similar recently (and to be honest, the methodology is very close to what Riedelme suggested already):

    (1) create an item hidden in the area containing the keys to be turned off (make sure it's AFTER the buttons you want to disable)
    (2) in the message text of the element element field, enter Javascript to disable the button (s) - for example:

    (3) set the conditional display of this point on the result of a PL/SQL function returns BOOLEAN - in this case, it would be your authorization feature, or whatever. Or you can use regardless of the conditional formula meets your configuration.

    In this way, every time this hidden item is loaded i.e. authorization fails for example, the javascript code snippet will be loaded and executed, and your buttons will be disabled!

    Hope that makes sense!

    Chris

  • display edit link based on a condition problem

    Hello

    Someone can such me how I can display the link change in every line of my report based on a condition... is the query on which my report is formed, as shown below

    SELECT COMPUTER_ID,
    COMPUTERNAME, BATCH, DESCRIPTION, OPERATING_SYS.
    PRIMADMIN_PHONE, PRIM_ADMIN, PRIMADMIN_CNID,
    SECONDADMIN_PHONE, SECONDARY_ADMIN, SECADMIN_CNID,
    RACK_NUM, MAINTENANCE_WINDOW from cts_masterserverview where ACTIVE_STATE = 'Active'.


    All these data are from several fields. If city and Andy see, probably they will remember... They helped me to change this option much... my problem is now
    I did the columns computer_id, which is the key in all other tables as a button change. And when the user clicks this edit button, data row respective are filled in the form, where the data can be changed...

    My requirement is now, at each change of line button should appear only if the user logged on as long as the PrimAdmin of this line... I am recovery PrimAdmin_CNID so that it can be compared against: APP_USER. All others should be able to view the data, but not modify... I am not able to figure out how I can conditionally display as I do for the other buttons.

    Can someone give an idea on how to do...


    Thank you
    Yvette

    Published by: user0012 on May 1st, 2009 13:25

    Hi David,

    Use the following query to conditional change the link,.

    SELECT
               CASE WHEN PRIMADMIN_CNID = :APP_USER THEN
                  ''
                ELSE
                         ' '
                END Edit
               ,COMPUTER_ID
               ,COMPUTER_NAME
               ,STATUS_ID
               ,DESCRIPTION
               ,OPERATING_SYS
               ,PRIMADMIN_PHONE
               , PRIM_ADMIN
               ,PRIMADMIN_CNID
               ,SECONDADMIN_PHONE
               ,SECONDARY_ADMIN
               ,SECADMIN_CNID
               ,RACK_NUM
               ,MAINTENANCE_WINDOW
               from cts_masterserverview
    where ACTIVE_STATE = 'Active'
    
    Add onclick= before "javascript above and Change the number 7 in the javascript to the page where you have edit form.
    

    Thank you
    Manish

  • Disable the button Wireless Laser Mouse PA3706E Alt + Tab?

    I have what I think, it's a mouse Toshiba PA3706E (it's the one in the picture below)

    It has a small button of Alt + Tab at the worst place in the fact that it could be, and I was wondering if anyone knows a way to disable? I installed the thing that comes with it to change the functions of the buttons, but for some reason, it is the only button you cannot not change or not. The only option for the Application Switch button is Alt + Tab.

    http://img340.imageshack.us/img340/8080/mousedriver.PNG

    Anyone? It's makes me absolutely crazy and things like TF2 happens to crash when it Alt + tabs; -

    > Is it possible to disable it, as pilot/configure CD software that comes with the mouse wont allow it.
    Well, if the software that came with the mouse, does not support this option, then I put t see any other possibility to disable the button ALT + TAB.

  • Satellite E100-004 - can I disable media buttons as mute, play pause

    My laptop is Toshiba Satellite E100-004.
    is there a way disable the multimedia button panel (Media buttons on top of keyboard - mute-media-play/pause-stop-rewind-forward-)?

    thanx

    Hello

    Please don't be crazy on my but I don't understand your question. These buttons are by default configured to run with pre-installed Windows media player. If you don't like them you just simply do not touch them.
    I know that you can change the browser settings and the multimedia key and define which application should be open with these buttons.

    In any case such option is unknown to me.
    Why you want to disable these buttons?

  • Disable the buttons before webservice response

    Hello

    How to disable the buttons until the webservice response came, but when came the web service respone it will allow all the button

    can you give me any suggestions...

    Thank you

    Learning by doing. I've attached an example that does what you want to do, disable the buttons x, where x in this example is 5 seconds to activate the buttons and where x for you would be availability of webservice response.

    All what you need to do is:

    • Add ID to your buttons (see the example input elements I used)
    • Add the source to remove the attribute "disabled" of these buttons (see the example of function that I have documented)

    She's.

  • How to disable the button to remove the application.

    I want to implement a feature to disable a button Delete a particular application so that the user can not remove it applications.

    How can I implement this.

    is not possible

  • Hide an entire column based on a condition

    Hello

    I'm trying to completely hide a column in a table based on a condition, if the column was not present. I wrote two conditional regions for the header and data, but it is still showing up. Any help would be appreciated. The XML model RTF, the PDF generated and the output I'm looking is attached. Thank you.

    Please check your email that I have forwarded to update the model.

    I counted occurrences of January in your xml and formed the condition based on the fi

    MONTH

Maybe you are looking for