Javascript: display region

Hi,
is it possible to hide / show a region with javascript? I know there are functions for items, but I have a whole region, that I want to display depending on a select list. I know I could do this with a select list with redirect and then create a conditional display, but I don't want to have the page submitted always, when user is making a select from the list.
Any ideas?
Thanks
chrissy

Victorp,
If you're still interested, I have a solution for this using AJAX and the APEX repository. It pulls the region id back from the repository dynamically, so no need to hard code.
(This solution assumes you have no regions with the same name on the same page.)
1. Create an application item called, 'TEMPORARY_REGION_NAME'.
2. Create an application process with the following parameters:
Name: GET_REGION_ID
Processing point: 'On demand...'
Process text:
declare
   v_region_id number;
begin
   owa_util.mime_header('text/xml', FALSE );
   htp.p('Cache-Control: no-cache');
   htp.p('Pragma: no-cache');
   owa_util.http_header_close;
   --Retrieve the region id from the repository
   select region_id
   into v_region_id
   from apex_application_page_regions
   where 1=1
   and application_id = :APP_ID
   and page_id = :APP_PAGE_ID
   and region_name = :TEMPORARY_REGION_NAME;
   htp.prn(v_region_id);
   --Clear it ready for next usage
   :TEMPORARY_REGION_NAME := '';
exception
   when no_data_found then
      htp.prn('No Data Found');
end;3. Make the following 2 javascript functions available to your application (suggested method would be in a '.js' file stored on the webserver).
function getRegionId(p_region_name){
   var regionId = null;
   var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=GET_REGION_ID',$x("pFlowStepId").value);
   get.add('TEMPORARY_REGION_NAME',p_region_name);
   return regionId = 'R' + get.get();
   get = null;
function toggleRegion(p_region_name){
   //get region id from repository to avoid hard coding
   var regionId = getRegionId(p_region_name);
   $x_Toggle(regionId);
}4. Add the following code to the 'Element > HTML Form Element Attributes' of the page item you wish activate the toggle:
onchange="toggleRegion('<your region name>');"Hope this helps anyone out there still using 2.2.
Anthony.
http://anthonyrayner.blogspot.com
Message was edited by:
Anthony Rayner

Similar Messages

  • How to display region from one page on the other page?

    Hi,
    I'd like to ask if someone know how to display region created on page X on page Y.
    I've tried to create a "URL" region on Y but this doesn't work and I generally think this is blind way.
    Next I've found an internal function "flows_020100.wwv_flow_disp_page_plugs()" that works pretty well (PL/SQL type region with calling the function) except that is displaying only regions on the same page. I know it's dirty hack but ...
    Any ideas or hints how to solve this? Thanks ...

    have a look here ...
    http://www.oracle.com/technology/products/database/application_express/pdf/apex_best_practices.pdf

  • Display region after one process has run

    I am using htmldb2.0 and I want to display regions after one process in another region of the same page has run. There is type named as "when process in comma delimited list of Process IDs has run" in condition type of region edit. I tried it with putting my process name(also followed with comma) in expression 1 text area but it doesn't work. I am wondering if this doesn't work, how can I implement it in my application.
    Thanks in advance,
    Ke Lin

    I do not get but....
    If one process on page start...then page is not rerenderd until it is finished. If process if finished page is submited and then on refresh page process is not running.
    So I do not understand how can two process be started on the same process together?
    If this si so maye this could be the solution....
    could you create autonomous transaction (it commits their data regarding transaction that it participate in!) to make some parameter in table to 1.
    When other process starts it checks this value and if this param is 1 then it should not continue.
    P.S.
    Do not forget to put another autonomous transaction procedure which will set param to "0" after process finish.
    Do this main proc with strong exception handling to ensure that param is allways set to 0.

  • Displaying region based on multiple selection list

    Hi,
    this is my scenario.
    i had 3 drop down selection lists A, B, C. based on A and/or B, C is populated. and when i select one from C, i display a report regions.
    i am able to achieve this, and when in the selection list C, I have a null value as "- All -"
    so when i select "- All -" then the report region should not show anything.
    so in my report region query this is what i gave
    DECLARE
    q varchar2(2000); --query
    w varchar2(2000); --where clause
    we varchar2(1) := 'N'; --where condition
    BEGIN
    q := 'SELECT * from SCCATCH';
    IF :P1_STATION != 'NULL' THEN
    w := 'COLLECTION = :P1_STATION';
    we := 'Y';
    END IF;
    IF we = 'Y' THEN
    q := q ||' WHERE '|| w ;
    END IF;
    RETURN q;
    END;
    where :P1_STATION is the item value of C.
    now what is not working is when i select A, B then C is populated and whne i select C, the report region is displayed.
    now when i go back and select A, B , then C is again populated with a different C list, but the report region still remains the same showing the previous result.
    what i really want to do is. when i select list A,B and then C, report get displayed. and when i go back and change sleection in A,B and then obviously C gets changed, then the report region should not show anything untill i select one from C.
    i understand that there is some basic things i need to do to fix this, but i am not able to fix this.
    Can you help me please.
    Thanks,
    Philip.

    user12943263 wrote:
    HiPlease update your forum profile with a real handle instead of "user12943263".
    I basically want to use the select below for my list but I do not know how to get the app and session no.
    select list_desc, 'f?p='||get_app_id|| ':' || page_no||':' || get_session_id
    from table_nameIn SQL use bind variable notation as described in the Understanding Substitution Strings section of the documentation:
    select
      ,  'f?p=' || :app_id || ':' || page_no || ':' || :app_session
    from
        ... Always consult the documentation before posting here.
    Dynamic Actions, JavaScript, and all "P.Ranish" posts above are all irrelevant to your question.

  • JavaScript displays oversize fonts in multiple browsers (OS 10.4.10)

    My web site uses JavaScript for tabbed dropdown menus and scrolling type. Some users with OS 10.4.10 report that the type displayed by the JavaScript is oversize. For tabbed menus this causes the row of tabs to become too long so that the last tab(s) of the line wrap to a new line, causing them to become inaccessible. This problem does not occur for all users of OS 10.4.10 -- the tabs display properly for some and not for others. For those users with the problem, it occurs with Safari, Camino, Firefox and Omniweb, but not the old IE. I have tested the page on Safari, Opera, Netscape, Camino & Firefox on Mac (10.3.9), as well as Win IE, Netscape and Firefox, but cannot reproduce the problem. While so far I've only gotten reports of this occuring for OS 10.4.10 users, it has occurred on non-Intel as well as Intel Macs.
    The web page is at: http://pathwaysoflight.org
    Any ideas on the cause and resolution?

    Robert,
    For what it's worth...
    I viewed your site using updated versions of Camino, Firefox, Safari, Shiira, Opera and IE. With the exception of IE 5.2.3, I was able to reproduce the trouble in each browser when I set a minimum font size to anything above number 11. Setting the minimum font to 12 caused the "Links" menu to get crowded out; setting to 14 would cause multiple menus to become jumbled. The problem occurred whether my display's resolution was set to 800 x 600, or 1024 x 768. The good news was that in each case resetting the minimum font size (within the respective browsers' preferences) to 11 solved the problem.
    Viewing the site in IE, which doesn't feature a minimum font size setting option, presented its own difficulties: mousing over any of the menu items expanded the drop-down menus as expected, but moving the mouse away from, or clicking outside the menu area, would fail to collapse the menus. The only workaround for me was to refresh the page and try to keep the mouse pointer away from the menus.
    A couple things to look into perhaps...
    Good luck!
    Andrew99

  • Display regions dynamically on the same page

    Hi
    I have 2 regions.Top is an interactive editable report.Bottom region is a read only report of the same(top region)
    But when i click search button(based on paramters 1&2, i am not able to see the same number of rows.
    Top region shows 5..But bottom region shows not the same.
    Is there any custom process i need to add ?
    Please advice
    thank
    kp

    >
    http://localhost
    ----------^^^^^^^^^
    uhhh....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "namtax" <[email protected]> wrote in
    message
    news:ej54sr$m7q$[email protected]..
    > im trying to code my tree menu so that when you click on
    the album name
    > the
    > song names would display dynamically on the same page..
    >
    > Heres my page at the moment
    >
    >
    http://localhost/music_explained/forta_explained/blah_7.cfm
    >
    > I have added a href field to the album section of the
    cftree, so that when
    > you
    > click on that a question mark appears after the URL.
    > I have set up a query that selects song names dependant
    to the record
    > which is
    > clicked on the cftree...but i am having
    difficulties...anyone know of a
    > tutorial or anything on this particular topic.
    >
    > Cheers
    >

  • Display region based on authorization scheme

    I have a region on a page that is displayed based on the 'SFD' authorization scheme.
    I log in as a user who matches the 'SFD' authorization scheme. This scheme queries a table called gnt_authorization to determine if the app user does indeed satisfy the condition, and I do.
    But when I open the page, the region is not displayed.
    Does anyone have any idea why?

    varad wrote:
    Does the region render if you logged in using an account other than 'myloginid' ?
    I just took another existing account and updated its authorization in gillnet_tag_authorization so that it now says department SFD and startup_page 15. I committed the change. Then I logged in as this user and the region did not display.
    But I wonder if I had to close the browser first before this takes effect because the authorization scheme is checked once per session and I had previously already logged in as that user before making the authorization change.
    varad wrote:
    Has the right Authorization Scheme been specified for the region ?
    Yes, it's set to SFD.

  • Hide/display regions dynamically

    Hi,
    I am using APEX 4.0.
    In my application I created 3 buttons. (Login, change password, forgot password).
    I want that user see change passoword region when change password button is pressed.
    Similarly with forgot password.
    How can this be achieved in APEX.
    In oracle forms it was as simple as (set item_property....visible ...false). Is there anything like that in APEX?.
    Thanks
    Munish

    Hello Munish,
    Take a look over there, I tried not to change your configurations, only added the options. Steps:
    -> Editing Page -> Execute when Page Loads = $('#R11186522721897120484').hide();
    This will hide the region.
    -> Created a Button ( as Button Region ) -> Action = Redirect to URL -> URL Target = javascript:$('#R11186522721897120484').show();
    This will show the region when click in the button.
    This amount of numbers *#R11186522721897120484* is the ID of the region, you can check it on the source code.
    PS: You can use javascript:$('#R11186522721897120484').toggle(); if you want that the Change button show and close the region.
    Regards,
    Alan Martini.
    Edited by: Alan Martini on 15/04/2011 16:19

  • Reports: Javascript in Region Footer and Links in cells

    Hi all!
    I need to put hyperlinks in my APEX (4.0) Report and I read there is no direct option for it... this is how I thought to do, then...
    My reports contains two columns:
    DEVICE and HEALTH.
    The first contains a String with Devices' name, and the second a Number to be intended as percentual.
    I need Strings in DEVICE columns are also links to another APEX page where I have to generate a "dynamical" chart.
    I.E.: we can intend a Report Row where DEVICE is "000x0" and HEALTH "30".
    APEX generate HTML like this:
    <td headers="DEVICE" class="data">000x0</td><td headers="HEALTH" class="data">30</td>
    But I also need "000x0" to be a link to: "f?p=104:4:2205607043123699::::THE_DEVICE:000x0".
    As to say: the fourth page of my APEX site, where "THE_DEVICE" is an APPLICATION_ITEM and it have to contains the name of clicked Device.
    First thing I tried is to re-write pl/sql query to automatically returns html code for the link, like:
    select
    ''||DEVICE||'' as DEVICE,
    trunc(HEALTH, 2) as HEALTH
    from [...]
    But APEX convert special characters to &x; values:
    &amp;lt;a href=&amp;quot;f?p=104:4:2205607043123699::::THE_DEVICE:000&amp;quot; target=&amp;quot;_self&amp;quot;&amp;quot;&amp;gt;000&amp;lt;/a&amp;gt;
    Second thing I thought is to give an Unique ID to Report's Region ("ALARM_DEVICES_REG") and try to modify that text dynamically by adding JavaScript to Footer Region.
    I checked and found in this forum a JavaScript suggested to somebody which had similar problem to mine, then I tried to adapt to my situation.
    The fact is that my JavaScript in Footer Region doesn't seems to work at all! Neither a simple document.write("bye!"); comand!
    How possible?
    The JavaScript I tried to create could also contains errors, and it's the following:
    <script type="text/javascript">
    var y = document.getElementById('report_ALARM_DEVICES_REG')
    var x = y.getElementsByTagName('TD');
    var s;
    if (x)
    for (var i = 0; i < x.length; i++)
    s = x.item(i);
    if(s.getAttribute('headers') == 'DEVICE')
    s.data = replaceHtmlEntites(s.data);
    </script>
    I noticed the innerTable for Reports area has "report_ALARM_DEVICES_REG" id (while the outer has "ALARM_DEVICES_REG") so I used it to be more selective.
    replaceHtmlEntites is a function which should bring back special character from "&x;" values, and it's the following (I put it in "Function and Global Variable Declaration" area of Report's APEX page):
    var replaceHtmlEntites = (
    function() {
    var translate_re = "/&(nbsp|amp|quot|lt|gt);/g";
    var translate = {
    "nbsp": " ",
    "amp" : "&",
    "quot": "\"",
    "lt" : "<",
    "gt" : ">"
    return function(s) {
    return ( s.replace(translate_re, function(match, entity) {
    return translate[entity];
    Shouldn't this work? And if not, why?
    Thank you all!

    But APEX convert special characters to &x; values:If you had changed the report column type to "Standard Report column" , it would not hav escaped your HTML codes
    As for the JS code
    the function "replaceHtmlEntites" had an error at
    "lt" : "<"gt" : ">"it has to be
    {code}
    "lt" : "<",
    "gt" : ">"
    {code}
    In any case , you are doing a lot of extra work unnecessarily , firstly by not using the "column link" functionality and secondly trying to 'unescape' html code.
    Anyways,Here's a bit of code that does 'unescaping'
    {code}
    function htmlDecode(value){
    return $('<div/>').html(value).text();
    {code}
    +Note: This method is not a safe one+

  • Not displaying region in sapscript

    Hi,
    I was trying to display the region for ship to party in sapscript but unable to display on the form.When i debug i am getting the value as 100 but only thing is not able to display on the form.
    Is there any chance that anybody could help me out on this.
    Thanks,
    Priya.

    What values are you passing to the SAPScript and how are you printing them?
    Are you using
    /: ADDRESS DELIVERY PARAGRAPH AS
    /: ADDRESSNUMBER &ADRN&
    /: FROMCOUNTRY &CNTRY&
    /: ENDADDRESS
    it will print according to the postal regulations for the addressee country which may preclude using the region.
    If you are just passing a value for region you'll need to convert it from the number value to the text value
    SELECT SINGLE * FROM t005t WHERE spras = nast-spras
                                                    AND      land1 = <country>
                                                    AND      bland = <region>

  • Problems displaying regions in desired Template positions

    Hi,
    I am developing a page that requires a similar layout to: [http://www.amanda-nixon.com/APEX/APEX_page_layout.gif|http://www.amanda-nixon.com/APEX/APEX_page_layout.gif]
    The theme/template that I am using has the following Region display points: [http://www.amanda-nixon.com/APEX/page_template_layout.gif|http://www.amanda-nixon.com/APEX/page_template_layout.gif]
    I assumed that APEX has 9 columns to display in, but you also have the choice of Page Template Body (1), Page Template Body (2), and Page Template Body (3).
    Therefore, its like having 3 separate tables on top of each other, each with 9 columns. Therefore my layout should be achievable setting the regions as the following:
    Region 1:
    Display Point: Page Template Body (1)
    Column: 1
    Region 2:
    Display Point: Page Template Body (1)
    Column: 2
    Region 3:
    Display Point: Page Template Body (1)
    Column: 2
    Region 4:
    Display Point: Page Template Body (2)
    Column: 1
    Region 5:
    Display Point: Page Template Body (2)
    Column: 1
    The problem is, regions 4 and 5 are displaying to the right of 2 and 3, sort of in a 3rd column, instead of displaying below.
    What is weird is that the tewo regions display mostly off the page, and there is no scroller at the bottom of the browser to let me scroll to the right to see regiosn 4 & 5.
    I'm not sure if this is a bug somewhere, or something I am doing wrong? (I have achieved a similar result in another application using the same version and template that worked fine).
    I'm using Application Express Version 3.1.0.00.32.
    Amanda.

    In one of my presentations I say you should use FF for development but test your apps in IE ;)
    I changed this part of the page template body:
    <div id="t20ContentMiddle">#BOX_BODY##REGION_POSITION_02##REGION_POSITION_04#</div>
    <div id="t20ContentMiddle">
    <table><tr><td>#BOX_BODY##REGION_POSITION_02#</td></tr><td><tr>#REGION_POSITION_04#</td></tr></table>
    </div>and now it renders as expected in IE as well.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Display region base on multiple conditions

    Hi,
    Is is possible to display a region base on few different conditons?
    eg. current page not in (1,2) and current page not in printer friendly mode...
    Thanks
    Vincent

    Make a PL/SQL Expression condition with:
    (apex_application.g_printer_friendly = false) and (apex_application.g_flow_step_id not in (1,2))
    Scott

  • To display region on a click of a button

    hi,
    I want to display a region on a click of a button which is in another region.I want when i click that button region containing button should get disappear and another region should get appear.when next time i open that page
    region containing button should appear first.
    second, i want to insert a check constraint on a field called mailid,that at time of inserting data in it ,it should contain '@'sign,if not a message should get displayed.
    pls can u help in out.

    Mak,
    To show and hide your regions, you need to use conditions, please review the following section in the HTML DB documentation for information on how to do work with conditions:
    http://download-west.oracle.com/docs/cd/B12037_01/appdev.101/b10992/mvl_a_con.htm#sthref1724
    To validate your mail ID you could work with database constraints. However in order to customize your error message, I'd recommend using HTML DB validations, see the HTML DB documentation, chapter 7 for more information on how to work with validations:
    http://download-west.oracle.com/docs/cd/B12037_01/appdev.101/b10992/mvl_buildr.htm#sthref938
    Regards,
    Marc

  • Conditionally Displaying Regions w/o Submitting Page

    I have a radiogroup with 6 choices in it. For each of these 6 choices exists a corresponding region, which I want to conditionally display upon choosing its corresponding choice in the radiogroup. The problem I'm having is that the only way I know how to do this is to make the radiogroup a radiogroup w/ submit, but I don't want to submit the entire page and its contents upon making a selection from the radiogroup, I just want to conditionally display specific regions and not submit the page until the submit button is clicked. It seems as though there should be an easy way to do this, is there?

    That's actually the first thing I tried too. The only problem with that is that with just a redirect, the item doesn't seem to store the value of the choice from the radiogroup, so there's no criteria there by which to set the conditional display.

  • Lync Outlook Plug-in displays Region and Language in Meeting Invite only with Lync 2013

    Hello,
    I am running Lync 2010 right now and have a some users who are using Office 2013 and Lync 2013 client. When they create an Online Meeting using the plug-in in outlook the meeting invite shows the location and number but also displays the region that number
    is coming from along with the Primary Language it is available in. This does not happen with Lync 2010 client and Office 2010. I really don't think the region name and the language is important and it makes the meeting invite look messy. Is there a way to prevent
    this globally? Is this what I can expect from Lync 2013, as I am in the process of deploying that now?

    Holger is right, that's just the way it is and you can't really change it. You can customize what is seen in the screenshot however.    The only thing you can really do is hand edit them, or if it's the dedicated meeting space you could
    cut and paste it into a signature and customize it any way you like, but that breaks other things like some of the one-click join functionality.
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
    SWC Unified Communications
    This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for

  • I need to cancel my subscription and get a refund.

    How do I do that?

  • How to cancel a credit memo

    Hi Is there a way to cancel a credit memo in SAP.? Thanks for the help Sanjaya PS:Sorry Wrong Forum Edited by: Sanjaya Wicky on Jan 18, 2008 5:35 AM

  • Wifi for blackberry

    Hello I have a blackberry curve 8310 and i use it quite a lot . is there any way that i can use my home wifi , the data plan is costing me a fortune .

  • Final Cut Studio floating license.

    Hi, I was wondering what kind of licensing Final Cut Studio comes with. I have a Macbook Pro, and am about to get a Mac Pro as well. At the moment I do not have FCS, but am about to buy a copy ... I was wondering whether I can install it on my Mac Pr

  • Animating graph in motion 2

    I'm trying to animate a graph in Motion 2. It is a growing line (curved graph line) Any idea on how to do this? Also, it would be nice to have dots appear on the line as it grows.