How do I keep Hide / Show Region open

Hi,
I have a page with one region based on a hide/show template. The current behaviour on a page submit is that the region always hides.
I'd like it so that if the user opens the region that it will remain open after the page refreshes.
Thanks,
Brian

This is a hack so I wouldn't count on it, but it worked for me (in variation, I needed a bit different thing). And, remind you, it only holds one of them open for a page (my logic is, that when they are hidden no more than one should be open at once).
1) the page should have an item that holds the information - I'll call it OPEN_REGION. I am knowingly ignoring the usual Pn_ naming convention so all pages with Hide / Show regions could have their own OPEN_REGION but the name could still be uniquely referenced in javascript. It should be a hidden variable in the topmost region in the template (which must not be one of those enhanced HIde/Show regions).
2) make a new javascript function to set the item and submit page. Be careful to make sure you use valid variables or javascript errors display when no OPEN_REGION item is on the page (for example).
function myHideShow ( region )
if (document.getElementById('OPEN_REGION'))
if ( document.getElementById('OPEN_REGION').value != region )
document.getElementById('OPEN_REGION').value = region;
}else{
document.getElementById('OPEN_REGION').value = '';
doSubmit();
2) edit the region template. Set it to call your own function.
Where it sais:
href="javascript:hideShow('region#REGION_SEQUENCE_ID#','shIMG#REGION_SEQUENCE_ID#','#IMAGE_PREFIX#jtfuhide.gif','#IMAGE_PREFIX#jtfushow.gif');"
make it (set the page item to the region sequence number):
href="javascript:myHideShow('#REGION_SEQUENCE_ID#');"
3) edit your page template, in the footer add the opening of the region. Be careful to make sure you use valid variables or javascript errors display when no OPEN_REGION item is on the page (for example).
<script>
if (document.getElementById('OPEN_REGION'))
if (document.getElementById('OPEN_REGION').value != '')
theRegion = document.getElementById('OPEN_REGION').value;
hideShow('region'+theRegion, 'shIMG'+theRegion, '#IMAGE_PREFIX#jtfuhide.gif', '#IMAGE_PREFIX#jtfushow.gif');
</script>
That should do it, but be aware, that I am not in Oracle team, just a simple programmer trying to find my own solutions and Javascript has helped me here sometimes.
For example, try to use #TITLE# substitution string in BODY part of the Page Template...

Similar Messages

  • Keeping Hide / Show Region open

    My application uses page 0 in wicth I have created :
    - regions in position1 : Menus
    - region in position 2 : bedy of the page.
    For the menu regions, I have used hide_show template because I have a lot of menu options.
    My problem is : when I expand a menu region and submit the page , the region becomes again closed.
    Any help ?
    Thanks.
    Jina.

    Hello Denes,
    I can not do this, because the page is shared between more than 200 pages.
    If I create a button with a request, I must do a redirect on this button to an Url OR a specific page but I cannot do this because I must stay in the current page.
    Thanks.
    Jina.

  • How to keep display as Show when using Hide Show region with pagination?

    We are trying to use a 'Hide Show' region with pagination. The problem is that if you 'Show' (ie expand) the region and then hit the link for the next page, the next page displays Hidden (ie collapsed). We want to keep the page display as 'show' when you move to the next set of records.
    There is a fix in this forum for this issue in version 2.2 (Application Express) but we are on 2.0.0.00.49 (HTML DB). Does anyone know of a similar fix for HTML DB 2?
    Ver 2.2 fix is at:
    http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html#STICKY
    Thanks.
    David.

    Thanks for your reply.
    Running the application install script via SQL Plus using FLOWS_020000 produces result:
    NOT COMPATIBLE (Your export may contain calls not supported by your HTMLDB version.)
    The wwv_flow_api package routines that are not available in our version appear to be:
    create_or_remove_file
    create_install
    create_install_script
    Is there any way to handle these calls in other ways?
    Thanks
    David.

  • Default Hide/Show Region to open

    I have a hide show region on page 0 that I want to sometimes default to opened (based on page item value). I added the code below to the region header of my hide show region. Worked fine, but now on all my pages that have Interactive Reports on them, clicking the drop-down arrow on the wheel throws an error 'gReport.controls is null or not an object'. Any ideas on how to get this to work on all pages?
    <script type="text/javascript">
    function showRegion(){
    //alert($x('P0_ALERT_REGION_VIEW').value);
    if ($x('P0_ALERT_REGION_VIEW').value == 'O')
    hideShow('region5');
    window.onload=showRegion;
    </script>

    I must be missing something.
    I gave the region a static ID of 'P0_ALERT_REGION' in the Region Defination section.
    Ran the page and looked for 'hideshow' (see below).
    Went into the Regio Header section and added:
    <script type="text/javascript">
    function showRegion(){
    //alert($x('P0_ALERT_REGION_VIEW').value);
    if ($x('P0_ALERT_REGION_VIEW').value == 'O')
    hideShow('region5','shIMG5','/i/themes/theme_10/showhide_hidden.gif');
    </script>
    When I open the page, region is still closed.
    <td class="t10RegionTitle"><span style="color: red;font-weight:bold"> Alerts (4 Found) </span><a class="eLink" title="Edit: &lt;span style=&quot;color: red;font-weight:bold&quot;&gt; Alerts (4 Found) &lt;/span&gt;" href="javascript:popupURL('f?p=4000:374:8668261332909072::::P374_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:9391908537586204,20080618,104');"><img src="/i/e.gif" alt="Edit" class="eLink" /></a><a style="margin-left:5px;" href="javascript:hideShow('region5','shIMG5','/i/themes/theme_10/showhide_hidden.gif','/i/themes/theme_10/showhide_show.gif');" class="htmldbHideShowMinLink"><img src="/i/themes/theme_10/showhide_hidden.gif"

  • How is a JQuery Vertical Accordian Different Than A Hide-Show Region

    Hello Everyone.
    I an using Apex 4.0.1. I recently learned how to create a JQuery vertical accordian. I'm using the sample accordian that Patrick Wolf recently created/posted. It uses a really nice "accordian template" that he put together. It's really quite useful when it comes to saving space and all on a page.
    Then I began wondering: How is this accordian different than Apex's own builtin Hide-Show Region template?
    And so, I created a sample page on my workspace in apex.oracle.com. I placed a JQuery vertical accordian that consists of 3 regions: 2 reports and a chart. I added a little bit of JQuery to Patrick's template that causes all 3 accordian slices to be closed as opposed to the default behavior of having one slice always open. I also added code that allows a user to re-size the entire accordian either vertically and/or horizontally.
    I then created 3 additional regions that mimic the first 3 regions above. These I placed in "column 2" on the page. For each region I assigned the "Hide-Show" template.
    As far as I can tell, both the accordian and the Hide-Show regions provide the same functionality.
    For the interested, here is a link to my page:
    http://apex.oracle.com/pls/apex/f?p=49919
    The app has open authentication assigned, and so, no login credentials are needed. Please click the "Accordian" tab.
    I realize that the accordian has more flexibilty in that one may add features like choosing to collapse/not collapse all slices and re-sizing, etc. I suppose one could do similarly for the Hide-Show regions using Javascript or JQuery but it would likely be an effort.
    Admittedly, such added features are cool and all. Still, it's been my experience that in the majority of business-like production environments, such "cool" features are pretty much useless. For example, I do not see how re-sizing the accordian or Hide-Show regions has much purpose. In fact, such "cool" features often get in the way of the main goal of the application.
    Of course, a JQuery accordian may also be created that expands/contracts slices "horizontally". I do not know of any way to do the same thing using Hide-Show regions. If someone does know how to do this, I (and likely others) would sure appreciate you sharing how.
    So, then, with respect to basic functionality (saving page real estate by encapsulating several regions), how is a JQuery vertical accordian any different than Apex's own builtin "Hide-Show" region?
    Thank you all for your thoughts/adice/code.
    Elie

    Hello Jari.
    Thank you for your help.
    Yes. Now I do understand what it is you are doing in your accordian page. And also I want to thsnk you for providing the sample code on your page showing how to go about preserving the current state of the accordian when you navigate from/to the page.
    You commented that this kind of state preservation is not available with the Hide/Show region. I'm thinking that you are correct, though I think I once saw something about doing this posted in this Forum. I'll search through and see if I can locate it.
    In any case, have you (or anyone else reading this thread) any other differences between a JQuery vertical accordian and Apex's own Hide/Show region? Other than being able to apply Javascript to an accordian to do things like preserve it's state (like you did), what else may one do with an accordian that is not doable (or at least not easily doable) with a Hide/Show region?
    Thank you for any further advice.
    Elie

  • Hide / Show region template - how to make it stay visible after NEXT& PREV?

    Hello,
    I am using the Hide / Show region template (by the way great idea to create this template ;)
    By default the region is hidden. If i want to see the region content (it is a report) I click on that icon and it becomes visible. For my report I use the pagination "ROW Ranges X to Y of Z (with pagination)".
    The issue is that if I click NEXT of Previous, the region is closing (hidding).. and in order to see the next / previous page of my report I have to re-open it..
    Is there any known workaround for this?
    Thank you in advance
    Anca

    I would start at Re: Toggle all hide show regions on a page open/closed
    It references the using javascript to manipulate your hide/show regions. It should get you started in the right direction. It is about the most straight-forward example I have seen for what you are trying to do<br><br>
    You could trigger the javascript after your page is rendered by calling it from the page footer and reference the values of page items to determine if you are supposed to hide the region(s).<br>
    Create a page item called P88_HIDESHOW_REGION1 and set it's value to Y or N depending on whether the #REQUEST# has a string in it that is part of report pagination. If you hover over a "next page" button in a report, check out the resulting URL that pops up in your browser.....it looks like ..../f?p=900:210:8352027355600111016:pg_R_241403738845262873:NO&pg_min_row=31&pg_max_rows=30&pg_rows_fetched=30
    <br>
    You could do an instr(:REQUEST,'pg_R_') > 0 then set P88_HIDESHOW_REGION1 = 'Y' else P88_HIDESHOW_REGION1 = 'N'. Your javascript called at the footer of the page could set the display of the region to on or off depending on the result of P88_HIDESHOW_REGION1

  • Horizontally laid-out hide-show regions/ mini-tabbed pages

    I'd like a mini-tabbed page layout, I can almost achieve this by having hide-show regions in which only one hide-show region is visible at a time, however the regions are stacked vertically, not horizontally. I don't want to use regular tabbed regions, because
    a) I'm already using two levels of tabs,
    b) I want these tabs to be all on the same page so I can use page-level processes.
    Cheers, Mark

    Hello Murray
    Thanks for going to the trouble of creating the little test site.
    Other browsers appear to load the pages much quicker. This may be because they are able to more inteligently handle our code, I don't know. Safari on our Macs zooms through it.
    In IE6 if I open a large Lesson and click next I see, at the bottom of the screen in the Status Bar, "(21 items remaining)" and then "(20 items remaining)" etc. which counts down and then disappears. Interestingly if the next screen happens to display the same image this does not happen, just the message "Done". If the next screen has a different image then the count down from "(21 items remaining)" again as all the linked resources (I presume) are downloaded.
    I have opened your site in IE6 (Windows XP Pro) and I don't see the message. However the image is so small that I may not because it is so fast to load.
    It may be related to how IE6 handles Temporary Internet Files, I'm not sure.

  • Error while trying to search in advanced table with hide/show region

    Hi
    I have search region and a results table with a hide.show in it.I did a search initially and got the results.I clicked on the hide/show region to see the details.
    I put another search criteria in the search region and tried to do a search.
    I am getting the following error
    The search cannot be executed because the table has pending changes that would be lost...
    Can anybody help me on this please....
    Message was edited by:
    user580745

    Any setter/getter method being used on hide/show action? How are you enabling the details? Is there a transient column in your VO?
    --Shiv                                                                                                                                                                                                                                                                                       

  • Validation on items in Hide/Show Region

    I have a validation on an item that is in a hide/show region. I display all my errors in-line with the field. When the validations fires, after the page is submitted, the hid/show region is closed so the user can't see the error. Is there a way in the validation to open the hide/show region so the error can be seen? I had tried this in my validation, but it doesn't work.
    htp.p('<script language=javascript>
    document.getElementById(' || '''' || 'P507_REPORT_SCHEDULER' || '''' || ').style.display=' || '''' || 'block' || '''' ||
    '</script>');

    Hi,
    You can try below steps:
    1) In PR, get handle to Hide Show bean.
    OADefaultHideShowBean hsb = (OADefaultHideShowBean)findIndexedChildRecursive("beanID") ;
    2) Expand the bean by using 'setDefaultDisclosed' property.
    hsb.setDefaultDisclosed(pageContext, Boolean.TRUE) ;
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Hide/SHow region

    Hi All,
    My requirement is to show the details in the region whenver the page opens as the user doesn't want to click on + sign everytime.
    Here I am not able to attach the screenshot for better understanding.
    Appreciate if any body can help on this.
    Thanks,
    Srinivas

    Srinivas,
    You mean to say that u don't want to use Hide/Show Region? You want to show the details for the all the rows once the page get loaded.
    Regards,
    Gyan

  • Button to hide/show regions

    I need to hide/show regions of a page based on when the user clicks a button.
    I have added the buttons to my page. I see there is a display condition section for the region. How can I tie them together to hide/show.

    Quick fix.
    http://htmldb.oracle.com/pls/otn/f?p=9741:1 (test/test)
    placed a couple of buttons in a different region, both as just redirects.
    Show has the following pl/sql expression as condition
    :REQUEST = 'HIDE'
    Hide has the following pl/sql expression as condition
    :REQUEST IS NULL OR :REQUEST = 'SHOW'
    The region has the following pl/sql expression as condition
    :REQUEST IS NULL OR :REQUEST<>'HIDE'
    - Neelesh

  • How do I keep applications from automatically opening when I power up my Macbook Air?

    How do I keep applications from automatically opening when I power up my Macbook Air?

    When you Shutdown or restart, uncheck this option.
    Regards,
    Captfred

  • I am doing two people's jobs and I need to use two separate log-ins on the same website. How can I keep both log-ins open at the same time. Everytime I switch tabs I have to log in again.

    I am doing two people's jobs and I need to use two separate log-ins on the same website. How can I keep both log-ins open at the same time. Everytime I switch tabs I have to log in again.

    Try one of these extensions for multiple cookie sessions.
    Multifox: <br />
    http://br.mozdev.org/multifox/ <br />
    Cookie Swap extension: <br />
    https://addons.mozilla.org/firefox/3255/ <br />
    Cookie Pie extension: <br />
    http://www.nektra.com/oss/firefox/extensions/cookiepie/

  • How do I keep the source document open when linking to a target document using the destination option in Adobe X?

    How do I keep the source document open when linking to a target document using the destination option in Adobe X? Have several links to create in the source document and want to keep the source document and target document open at the same time.

    Go to Edit - Preferences - Documents and un-tick "Open cross-document links
    in the same window".

  • Mantain state of hide show region

    hi to all,
    have someone been able to modify hide / show region to mantain state?
    This would be a great and if nobody has found a way,
    this would be really nice to have in next apex release.
    thanx

    Here is something to start with,
    If you check the Hide and show template in 4.0 (the classnames might be slightly different depending on your theme)
    &lt;table class=&quot;t5HideandShowRegion&quot; id=&quot;#REGION_ID#&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; summary=&quot;&quot;&gt;
    &lt;tr&gt;&lt;td class=&quot;t5RegionHeader&quot;&gt;#TITLE#&lt;a style=&quot;margin-left:5px;&quot; href=&quot;javascript:hideShow('region#REGION_SEQUENCE_ID#','shIMG#REGION_SEQUENCE_ID#','#IMAGE_PREFIX#themes/theme_5/rollup_plus_dgray.gif','#IMAGE_PREFIX#themes/theme_5/rollup_minus_dgray.gif');&quot; class=&quot;htmldbHideShowMinLink&quot;&gt;&lt;img src=&quot;#IMAGE_PREFIX#themes/theme_5/rollup_plus_dgray.gif&quot; <br/> id=&quot;shIMG#REGION_SEQUENCE_ID#&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td nowrap=&quot;nowrap&quot;&gt;&lt;div class=&quot;t5Hide&quot; id=&quot;region#REGION_SEQUENCE_ID#&quot;&gt;&lt;div class=&quot;t5ButtonHolder&quot;&gt;#CLOSE#&lt;img src=&quot;#IMAGE_PREFIX#themes/theme_5/1px_trans.gif&quot; height=&quot;1&quot; width=&quot;15&quot; alt=&quot;&quot;/&gt;#PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##HELP#&lt;/div&gt;&lt;div class=&quot;t5RegionBody&quot;&gt;#BODY#&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;/table&gt;
    You can try changing the image references in the hideShow( function call to you plus and minus imgs. For the blue background color, you ll probably need to add an additional class to the RegionBody( t5RegionBody here) and add it to the page style.

Maybe you are looking for

  • Server-Side Include Issue - Please Help

    I am having trouble using server-side includes in Dreamweaver. When I use the SSI to insert the header file, the header document shows up on the page in design view, but I cannot click anything. The cursor turns into a "no sign" no matter where it is

  • Pagination woes

    Hi - wonder if anyone else has this problem...? I have three Framemaker book files. To simplify (and reduce the number of files, let's say I have: * Master book file file a file b file c file d * Book 1 file a file b file c * Book 2 file a file b fil

  • I create a new document A4 landscape @ 300ppi, but, when I look at the ruler it has the document at only 842px wide.

    Yes, so, as I was saying... for example when I place a 300ppi jpg into my new document it's huge, like almost 5 times the size of my document.  Is this something to do with some kind of default setting to design at 72ppi to save on memory? In photosh

  • Memory leak in String(byte[] bytes, int offset, int length)

    Has anyone run into memory leak problem using this String(byte[] bytes, int offset, int length) class? I am using it to convert byte array to string, and I am showing memory leak using this class. Any idea what is going on?

  • 11gR2 Startup sequence of an instance

    DB Version: 11.2 and higher OS version: Unix, Unix-like Lets say i have a 2-node RAC and on one of the nodes the clusterware and Instance is down. Are the below mentioned sequence in the correct order Step1. # cd $GRID_HOME # ./crsctl start crsStep2-