JavaScript to hide the region

I want to hide an entire region based on JavaScript. I can't use the conditional display of a region because it is at the request and cannot submit the page to check the value. I can't hide specific values, but the labels remain and the border of the region remains. Here's what I have so far.


OnChange = "Show_On_Selectlist_Value('P15_SIRT_DCSN_ID','6'); »


< script >
function Show_On_Selectlist_Value (CWnd, pValue)
{
var rv is $x (CWnd) .value;.

If (rv is pValue)
{
html_ShowElement ('P15_RR_COMMENTS');
html_ShowElement ('P15_RR_USER');
html_ShowElement ('P15_RR_DATE');
}
on the other
{
html_HideElement ('P15_RR_COMMENTS');
html_HideElement ('P15_RR_USER');
html_HideElement ('P15_RR_DATE');
}
}
< /script >

For the region that you want to hide, provide a value for the static attribute "ID". You can then use the javascript functions integrated '$x_Hide (NDP) and $x_Show (NDP)' to show or hide this region.
example of

$x_Hide('REGION_STATIC_ID') 

http://download.Oracle.com/docs/CD/E14373_01/apirefs.32/e13369/javascript_api.htm#CHDDAGFE

CITY

Tags: Database

Similar Questions

  • How to hide the region

    Hi, I created a page region 0 in my apex application. I understand that whatever it is in page 0 apply to all pages. Anyway, my problem is that the title of region shows on any page. They is a way to hide the region?

    Hi Dave.

    You can create a new model of the region with a model code;

    Templates-> Create model-> area - from scratch-> him give a name. Custom 1 model (for example) - class create.

    Edit this new model and modify the definition of #TITLE #.
    #BODY # to the following:

    #BODY #.

    Change your region to use this model and you'll be fine.


    Edit

    I just noticed that your javascript has been in the header.  I have my case is in the source of the region as

    Kofi

  • How to show or hide the region of the shuttle during the click on the radio buttons?

    Hello

    I'm new to JDeveloper. Here is my requirement.

    1. create 2 radio buttons: Yes and no and default displays "" selected radio button.

    2. create a region of shuttle with select query in VO.

    Query is:

    Select 'No group' for_user, for_pkg double null

    Union

    Select "Company" for_user, for_pkg "SEGMENT1" double

    Union

    Select 'Rental' for_user, for_pkg 'SEGMENT2"double

    Union

    Select 'Cost center' for_user, 'SEGMENT4' double for_pkg

    Union

    Select 'Project' for_user, 'SEGMENT5' double for_pkg

    Union

    Select "Intercompany" for_user, "SEGMENT8" for_pkg of the double

    order by nulls first for_pkg

    3. initially hide the region of the shuttle during the loading of the page.

    4. click on the radio button 'yes', display area of the shuttle with values at the head of list of query VO and empty list leak.

    5. new click on the 'no' radio button, he must hide region and so screen shuttle shuttle dynamically according to the selected option button.

    But my problem is I am able to hide area shuttle when the page loads at the beginning and after that, when I'm clicking 'Yes' radio button, is just to display area shuttle empty without value in the main list and once when I'm clicking 'No' radio button, it should hide area shuttle but he's not hiding. I used the RPP to show or hide the area Shuttle under certain conditions. I use JDev 10.1.3.3.0 version as we Oracle EBS version 12.1.2 in our society.

    Please find the attached draft and suggest me proper with examples of sample approach.

    Monika,

    I tried to get this working in the lower version of Jdeveloper and looks like it works.

    Can you make the change below and see what happens.

    1. modify your query to VO as below: (I replaced null with SEGMENT0)

    select 'No Grouping' for_user, 'SEGMENT0' for_pkg from dual
    union
    select 'Company' for_user, 'SEGMENT1' for_pkg from dual
    union
    select 'Location' for_user, 'SEGMENT2' for_pkg from dual
    union
    select 'Cost Center' for_user, 'SEGMENT4' for_pkg from dual
    union
    select 'Project' for_user, 'SEGMENT5' for_pkg from dual
    union
    select 'Intercompany' for_user,'SEGMENT8' for_pkg from dual
    order by for_pkg
    

    2. place VO execution to the processFormRequest:

        public void processFormRequest(OAPageContext pageContext,
                                       OAWebBean webBean) {
            System.out.println("In process Form Request");
            super.processFormRequest(pageContext, webBean);
            OAApplicationModuleImpl appModule =
                (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
            String eventParam = pageContext.getParameter(EVENT_PARAM);
            System.out.println("eventParam: " + eventParam);
            if ("showHideShuttle".equals(eventParam)) {
                //  appModule.invokeMethod("deletetrailing");
                System.out.println("Inside If");
                OAMessageCheckBoxBean messageCheckBoxBean = (OAMessageCheckBoxBean)webBean.findChildRecursive("checkBoxBean");
                System.out.println("messageCheckBoxBean : " + messageCheckBoxBean);
                String messageCheckBoxBeanVal = (String)messageCheckBoxBean.getValue(pageContext);
                System.out.println("messageCheckBoxBeanVal: " + messageCheckBoxBeanVal);
    
                if ("Y".equals(messageCheckBoxBeanVal)) {
                    OAViewObjectImpl shuttleVO1 =
                        (OAViewObjectImpl)appModule.findViewObject("ShuttleVO1");
                    if (shuttleVO1 != null) {
                        shuttleVO1.setWhereClause(null);
                        shuttleVO1.setWhereClauseParams(null);
                        shuttleVO1.executeQuery();
                        System.out.println("Executed Query : " + shuttleVO1.getQuery());
                    }
                    OAViewObjectImpl shuttleVO2 =
                        (OAViewObjectImpl)appModule.findViewObject("ShuttleVO2");
                    if (shuttleVO2 != null) {
                        shuttleVO2.setWhereClause("1=2");
                        shuttleVO2.setWhereClauseParams(null);
                        shuttleVO2.executeQuery();
                        System.out.println("Executed Query1 : " + shuttleVO2.getQuery());
                    }
                }
                String[] name = { "RenderAttr1" };
                String[] val = { messageCheckBoxBeanVal };
    
                Serializable[] params = { name, val };
                Class[] paramTypes = { String[].class, String[].class };
                appModule.invokeMethod("setXXCustomPVOValues", params, paramTypes);
    
            }
    
        }
    

    3. move Spel link shuttle Bean for the region of header above.

    Some useful links for the shuttle Bean:

    Technology blog based in Java of Sushant: 13. Area of application OFA shuttle

    Framework OA Blog: control of the shuttle as part of OSTEOARTHRITIS

    See you soon

    AJ

  • Hide the region using Lov apex oracle 5.0

    Created a static LOV to my report page.

    Now, a selection of drop down of lov values, I need to hide the region and for another selection, I need to see the region.

    Say it like...

    If you are already a customer then it is useless to see the area of registration, if you are a new user, you must complete the registration form.

    So I have to possibility of selection

    Already a customer of 1)

    (2) new customer

    Click on the selection to an existing customer of LOV only registration form region must didn't show the region that I created for new client.

    Ditto for the new customer.

    GOT STUCK HERE.

    I created LOV, but it redirects me to one page to another does not what I wanted.

    Apex. Oracle.com

    testdump/developer/Office

    Hi Dominique,.

    You can do this by creating two dynamic action

    Create a static region which equip your Lov article

    Now you have three regions

    1 static area - container of your LOV point

    2. new customer area

    3. existing customer area

    1. create a dynamic action to show and hide the new client area

    Event: change

    Selection type: point

    : Item Lov that contains (new or existing value)

    Condition: equals

    Value: N (assuming that N is the new customer return value)

    Action: show

    Fire on loading the Page: Yes

    Generate the opposite action of false: Yes

    Selection type: region

    Region: Select the new customer area

    2. create a dynamic action to show and hide Existing customer area

    Event: change

    Selection type: point

    : Item Lov that contains (new or existing value)

    Condition: equals

    Value: E (assuming that E is the return value of existing customers)

    Action: show

    Fire on loading the Page: Yes

    Generate the opposite action of false: Yes

    Selection type: region

    Region: Select the customer existing region

    Kind regards

    Jitendra

  • Problems with the layout themed to show/hide the region 25

    Hi all, Ive hit another question that I hope someone can help with...

    APEX 4.2.4 on XE... Theme 25.

    I've reproduced this login as apex.oracle.com [email protected] password newpass 291 3 application page.    (admin/admin is also implemented as a UN/pw)

    I have a skin region see the this Im using as a region of select query. There are a number of boxes, and a couple of display only fields that have values returned in it.

    I I set out them in a row, and after 3 items, I start a new line with the other 3 articles... that is

    X X X

    X X X

    Except that with the region set to show/hide and the model of the value without tab, no sidebar I get.

    X X

    X

    X X

    X

    If I change the standard region it works OK, and if I change models, it seems ok.  Ive tried all the combinations of columns, etc, but nothing helps...  Im trying to figure out if Im missing something, or I've hit a bug any... (almost certainly the old...) ...

    Thank you very much indeed

    Richard Legge wrote:

    I have a skin region see the this Im using as a region of select query. There are a number of boxes, and a couple of display only fields that have values returned in it.

    I I set out them in a row, and after 3 items, I start a new line with the other 3 articles... that is

    X X X

    X X X

    Except that with the region set to show/hide and the model of the value without tab, no sidebar I get.

    X X

    X

    X X

    X

    If I change the standard region it works OK, and if I change models, it seems ok.  Ive tried all the combinations of columns, etc, but nothing helps...  Im trying to figure out if Im missing something, or I've hit a bug any... (almost certainly the old...) ...

    The difference between the models of the region is that the Standard region has defined Points of view and the show/hide does not work. This is the mysterious properties that Oracle has not yet bothered to document. Their omission of this model is indeed likely to be a bug.

    Create a copy of the region show/hide template and add a point of view for the body of the region (content):

    Name: Body of the region

    Substitution of template: BODY

    Grid Support: Checked

    The maximum fixed grid columns: - 1


    Use the new model to show/hide for the region of select query.

  • hide the region if the recordset field is empty

    Hello

    IM after a logic that will allow me to hide a code if a field in a recordset is empty. so I have a field called motion in a Recordset called rsProj_detail, now if the query contains no text so I want to hide a region of code. does anyone know how to do this? I hope that ive made myself clearly, if this no is not please tell me and I have re written the post.

    Thank you

    Have you tried something like this?

  • How to hide the region report?

    Hi all

    In my application, I am uisng the concept of visibility serach when I click Search link I display another report as a message, because they have not entered or selected something before clicking the serach button.
    < {font size = '7' color = "red" > no data found for the search criteria.} Please < {a href = "f? p = & APP_ID.:6: & SESSION. {": No.:" > click here < /a >} re-enter the serach criteria! < {/ make >}


    Now, when this message comes they click here uisng the above message while this region must hide and only the first region should be present. For this, I tried like this

    < {font size = '7' color = "red" > no data found for the search criteria.} Please < {a href = "f? p = & APP_ID.:6: & SESSION. {": No.: P6_HIDE:hide" > click here < /a >} re-enter the serach criteria! < {/ make >}

    But there he throws error like 'cannot find the item for the '' show' ' element ID in the application. How to solve this problem.

    Or

    They is sort of othet instead of display the report can I view in the popular message stay no data found.

    Thank you
    David...

    You use the page validation to check if the search value is not null

  • Hide the "No data found" msg in the region to report when you 1st click Search page

    Hello

    (Sorry if it's confusing but my APEX is in FRENCH and I tried to translate)

    I created a search page in my application.

    1. I have an HTML region, with a search box and I have the search button

    2 - I have a region (PL/SQL source) report, which sometimes does not return any data, giving a message 'No Data Found.'.


    When I click on the search page for the 1st time (on my navigation bar), I like to HIDE the region report so that I do not have the message "no data found".

    Only once we click the search button and there is no result, I want to have the message "no data found".

    How can I achieve this?

    Thank you

    Roseline

    1. create an item hidden on your page (P1_HIDDEN_ELEMENT)

    2. place your message no data found in a span tag

    No Data Found
    

    3 create a load calculation to set your P1_HIDDEN_ELEMENT to 'no_data_found' if it is NULL and put it to ' ' if it is NOT NULL - body of the type PL/SQL function

    BEGIN
       IF :p1_hidden_element IS NULL
       THEN
          RETURN '';
       ELSIF :p1_hidden_element IS NOT NULL
       THEN
          RETURN ' ';
       END IF;
    END;
    

    4 put this in the footer:

    &P1_HIDDEN_ELEMENT.
    

    The alternative would be to create a display area – pure HTML and display only the first. Once the search has begun this region would remain hidden and only the report themselves.

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

  • With the help of JavaScript condition in the dynamic action of JQuery selector

    Hi guys,.

    I have a Setup master detail on a page.

    The detail section, I have a tabular presentation.  One of the fields is a selection list.  The first record in the select contains the value * not * that has a value of primary key for the 1.  I have a distinct region with a simple text field where the user can insert a value into the table if the value does not exist.

    I want than the region of text element to only appear if the value * not listed * is selected.

    I managed to make it work when the value is selected with the help of dynamic action with a bit of JQuery and JavaScript by setting the ID on the selection list to 'create' and have the following in JavaScript $(this.triggeringElement) .val ()! = 1 in the JavaScript for dynamic action condition shows it or hides the region of 'create' and that works well.

    However, if the secondary table is empty before the detail records were created (nothing selected in triggering jQuery Selector) the region of create is displayed when I don't want it.

    I guess I need some sort of NVL in JavaScript condition?

    I use APEX v4.2.

    Any advice would be appreciated.

    Chris

    Cashy wrote:

    I have a Setup master detail on a page.

    The detail section, I have a tabular presentation.  One of the fields is a selection list.  The first record in the select contains the value * not * that has a value of primary key for the 1.  I have a distinct region with a simple text field where the user can insert a value into the table if the value does not exist.

    I want than the region of text element to only appear if the value * not listed * is selected.

    I managed to make it work when the value is selected with the help of dynamic action with a bit of JQuery and JavaScript by setting the ID on the selection list to 'create' and have the following in JavaScript $(this.triggeringElement) .val ()! = 1 in the JavaScript for dynamic action condition shows it or hides the region of 'create' and that works well.

    However, if the secondary table is empty before the detail records were created (nothing selected in triggering jQuery Selector) the region of create is displayed when I don't want it.

    I guess I need some sort of NVL in JavaScript condition?

    I use APEX v4.2.

    Simple solution is to hide the region containing the element of text by default, using the style = "" view: no ' in the property of the attributes of the area in the region. " It will be always hidden when the page initially, but its visibility will be controlled by the DA subsequently.

  • "Hide / show" regions – how to keep open after send the page

    Hello

    I have several regions ' hide / show ' in my request... when the user submits the page, it closes all the

    is there a way to keep one open that were opened before the page is sent?

    Thanks in advance

    Long answer: forget the hidden item and simply store the values in a cookie.  Use dynamic action, 1 2 plan to store the values when the page is submitted and the 2nd DA to retrieve the value and developing regions.

    Hide and Show parts APEX sticky

    Dynamic action 1

    Name: Save the open areas

    Event: before the Page is sent

    Condition: - no requirement.

    Real Action:

    Action: Run the JavaScript Code

    Fire on Page load: [disabled]

    Code:

    var lOpenRegions = []
    $(".hide:visible").parent(".hide-show-region").each(function()
      { lOpenRegions.push($(this).attr("id")) });
    SetCookie("HideShowOpenRegions",lOpenRegions.join(","));
    

    Dynamic action 2

    Nom : Open saved regions

    Event: Loading the page

    Condition: - unconditionally.

    Real Action:

    Action: Run the JavaScript Code

    Fire on Page load: [disabled]

    Code:

    if (GetCookie("HideShowOpenRegions")) {
      $.each( GetCookie("HideShowOpenRegions").split(','),
                function(intIndex, objValue) {
                  $("#"+$nvl(objValue,"x")+" .hide:first").show();
                }
      );
    }
    
  • hide and show the region - hide by default

    Hello world
    I had a hide / show region on my page. I want to hide this default region (on each page load).
    In fact, it is open by default.
    How can I get that?
    I have tried many things, searched a lot of problems that.
    But I can not find a solution, which helped me.
    I am using a theme not Standard apex.
    Any suggestions?

    First run page using firefox or chrome and identify the name of the region, i.e. the #REGION_ID # in the model translates into something like "region5" when rendering.

    Change Page, in the section Javascript executed when the Page loads, enter the following command

    hideShow ('region5', 'shIMG5', '', '');

    This should toggle the current show / hide mode.

  • Put javascript in the region.

    Hello

    This application is in the apex 5.0.

    I loading DA running Javascript on the page code. This code draws something. But I don't want to draw on my regions. I want to put this picture in one of my areas.


    How can I do? This is what it looks like currently. I have a 'ghost' on the left and the region with some info on the right. http://i.imgur.com/UMn2WWu.jpg

    I want to make it look like this http://blog.theapexfreelancer.com/wp-content/uploads/2011/08/body-chart-example1.png

    Para wrote:

    It's possible to "join" somehow this circle (example below using raphael.js) for the region of the apex.

    I wish this circle was still drawn in the center of a region (there is little region on one page). How can I change the code so that it draws in the region?

    Whats happening is essentially. On appeal from the Im header HTML

    and I have a load DA than excecutes the code below.

    var paper = Raphael (10, 50, 320, 200);

    Did you read the documentation of Raphael? There are several methods of constructor for the creation of the canvas. You use above creates the Web from the browser window. To create the drawing within a region of the APEX, you use the method that includes a container object to the canvas as a parameter, with the body of the area element in the container. To do this, you must specify a static region ID for the region of container and use it to recover the body of region as a DOM object element and pass it to the constructor of Raphael:

    var canvasRegionBody = $('#static-region-id .t-Region-body')[0]; // .t-Region-body selector is theme-specific: inspect region code or template definition to determine region body element.
    var paper = Raphael(canvasRegionBody, 320, 200);
    var circle = paper.circle(50, 40, 10);
    circle.attr("fill", "#f00");
    circle.attr("stroke", "#fff");
    
  • How to hide the LOGO Apex region

    We use the apex of interactive reports that we want to integrate with a front-end web exist (window based). I want to hide the 'LOGO' region, as the end before the Wicket already takes care of the LOGO. How delete/hide the LOGO area.

    I suggest you open another thread for the other issue. You can close this thread if your question is answered.

  • Is it possible to detect the State of hide/show the region...

    Hello
    Is it possible to detect the State of hide / display area.

    I have three regions/hide RX, RY, RZ.
    When an EX event happens, then region RX should expand and the rest of the region collapses.

    When an event happens EY, then region RY should expand and collapse the rest of the region.
    ........
    ...

    We can use this JS on DA to change the status of a region:
    $("RX.uRegionControl").click ();
    $("RY.uRegionControl").click ();
    .....
    But, first of all, we need detect the State of where applies this da?


    I'm working on apex 4.2. Theme 25.

    Kind regards
    Fateh

    You can try this

    //example
    $('#RX .uRegionContent').is(":visible")
    // this will return boolean - true if it is expanded and false if collapsed
    
  • Hide/show the region

    Hello
    I'm trying to change the default behavior to hide/show the region to show, after a few attempts, I got partially work but now does not work by clicking on the icon to enable/disable/hide also changed the icons and added a type = "" but his does not work. " Any help? Thanks and greetings

    You can do so at the level of the model. Copy the skin and see the area to Hide and Show (show) and then modify the model. Essentially 2 thing I've changed are the image of collapse_minus.gif and style ="". My suggestion is to make a copy of the region before making any changes. It works for me in IE, Chrome and FF.







    #TITLE #.
    #CLOSE # PREVIOUS # ##DELETE NEXT ##EDIT ##CHANGE # CREATE # CREATE2 # EXPAND ##COPY # HELP #.
    #BODY #.

Maybe you are looking for