Making hide/show survive a page refresh

See
http://htmldb.oracle.com/pls/otn/f?p=24317:251
The Yes/No radiogroup options show/hide the next item row containing the text field.
But suppose I select No to hide the text field item row and click Submit, when the page refreshes, the text field is visible again.
What is the most generic way to make this kind of hide/show stuff "survive" a page refresh? Keeping in mind that I have a dozen such items on the page, so I wouldn't want to hardcode item names and stuff in my Javascript.
Carl? Anyone else?
Thanks

I put the following code in the Region Footer
<script type="text/javascript">
function foo()
var r=html_RadioValue('P251_X1');
if (r==false) return true;
if (r=='Yes') html_ShowItemRow('P251_X2');
else          {
   html_GetElement('P251_X2').value='N/A';
   html_HideItemRow('P251_X2');
return true;
window.onload=foo();
</script>And a onChange="foo()" in the HTML Form Element attributes for the P251_X1 item. Works like a champ.
I was missing the window.onload part.
Carl, if there is a better/recommended way to do this stuff, please let us know.
Thanks.

Similar Messages

  • Problem in Hide/Show in a Table Row

    Hi,
    i have to create 4 pages and each page has a table region with displaying records and a column "LINK" to go to the next page with the parameters from that record. Every link has a batchId and one another Id as parameter to next page. The next page reads the parameters and queries the corresponding table for details of that results table region contained in that page.
    Thus i have 4 pages with 4 table regions and each table region is associated with a view object which is based on an EO connected with a database table. (4 VO's).
    Now in every table i have a detail region (hide/show) which shows error records for a row ....
    thus there are 4 ViewLinks for all 4 VO to a single ERROR VO.
    I have 4 instances of ERRORVO in AM like ERRORVO1, ERRORVO2, ERRORVO3, ERRORVO4.
    Now, the hide/show region is working properly on the first 3 pages with proper navigation to pages.
    Then, i created the 4th page and created the table region in the 4th page.
    From the 3rd page i have passed 2 parameters through the link and also retainAM=Y.
    i have captured both parametres and call a method to populate data in table of 4th page.
    Successfully done..running properly....
    Now i added the detail region which is a table as previous pages in the 4th page with ERRORVO4...
    Then when i run the page i get the 1st page and thrugh link i move to 2nd and to 3rd page. But when i click on the link on 3rd page to move to 4th page i m getting "NullPointerException" with "check Inner table properties"
    Now i removed the detail region (Hide/show) only from the 4th page and again run the page . its working properly for all 4 pages with proper navigation but i am not able to see errors with hide/show on 4th page and it is required.
    i m not getting what could be the reason...
    do i need to remove retainAM=Y from the page navigation links.?????
    and is there anything like we cant create more no. of instances (4) of a single VO in an AM.....????
    Any alternative for showing the errors on 4th page with Hide/Show or without Hide/Show????

    Thiago,
    Thanks for the quick reply.
    I am now getting the following error below:
    Am I suppose to add another field to my VO select?
    oracle.apps.fnd.framework.OAException: Detail View Attribute Name is not set for the table even though a detail named child has been specified. Please specify a Boolean or String ("Y" or "N") view attribute for this table property.
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1146)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1794)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
         at OA.jspService(OA.jsp:40)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

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

  • Hide/Show Create button on a report/form page

    Hi, I included one form and the related report on one page.
    When I create a new record, it will show in the report below.
    I make the ID column as the link, which assign the ID to the ID item in the form. DML will do the rest work for display.
    However I got a issue. when I click the edit button for one row, the create button doesn't disappear. Although it has a condition of "VALUE OF ITEM IS NULL". I un-hidden the ID item and it do have value when I edit some row.
    Is this because of some refreshing reason or...?
    Your help will be great appreciated.
    Edited by: Gadfly on 2009-3-16 下午8:02

    BTW, this hide/show pattern of 'KEY VALUE is null' works well when I use two pages(one form and one report.)

  • Drill down hide/show report on same page

    Hi,
    Is it possible to create a drill down report where instead of linking to new pages, the details can be displayed using hide/show buttons on the relevant columns? For example, if you have the following fields:
    Region
    Country
    Division
    Account
    Order
    Product ID
    Product Price
    Would it be possible to ,by default, have the report only show distinct regions. By clicking an expand button on a particular region, it's countries are displayed. By clicking an expand button on a country, its divisions are displayed,etc., eventually being able to drill down to order details.
    This seems similar to a tree to me, although I have not used trees before. However, from the way I understand the structure of hierarchy in trees, the way this data is structured it would not be possible through a tree.
    Any ideas? If not I can just settle on a standard drill down report with links to new pages, but if the above is possible it would work much better for my users.
    Thanks

    FJW,
    Yes, it's possible. We typically refer people to this demo from Carl to get an idea of how it can be accomplished:
    http://htmldb.oracle.com/pls/otn/f?p=11933:13
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

  • Javascript help - Hide/Show a page item

    Environment:
    APEX 3.1.00.09 running on AIX 5.3
    Sample application on apex.oracle.com:
    Workspace: GALWAY
    UserID: gwicke
    Password: gwicke
    To see where my issues are:
    1- Start on page 3
    2- In the Agency drop down select 'J & B Marketing'
    3- In the Contract drop down select the only contract that appears
    4- Click on 'Edit Existing Contract'
    5- Note the page item 'LY Closings' has the value 261
    6- Click on the link (really a tab in my theme) at the top labeled 'Cost Detail'
    7- The 'Estimate Justification' is the page item to be displayed/hidden as noted below.
    8- The 'Homes Per Year' under the 'YEAR1' column is the user input page item
    9- The P2_BUILDER_CLOSINGS (value 261 noted above) is the page item to be used in the comparison
    I need to do a couple of things with a potentially hidden page item:
    1- Every time the page loads I need to check to see if the page item (P8_ESTIMATE_JUSTIFICATION) is not null and if it is indeed not null, make it displayed.
    2- When the user enters a value in another page item (P8_HOMES_PER_YEAR1), call a function to see if that value is more than 120% of another page item (P2_BUILDER_CLOSINGS) and if so make the above page item displayed (P8_ESTIMATE_JUSTIFICATION).
    I have the javascript function created (showHideEstimateJustification) and in the HTML Header of the page. The function is being called currently with an onChange check on the page item entered by the user as noted above (P8_HOMES_PER_YEAR1).
    Issues:
    1- I need to force a SUBMIT after the user enters the value for P8_HOMES_PER_YEAR1 so it is available in session state and hence to the javascript function (other ideas welcome!)
    2- I am currently using the x.style.display = 'inline' versus 'none' to hide/show the page item, where x is derived from var x = document.getElementById(P8_ESTIMATE_JUSTIFICATION) Is there a better way????
    Any help is greatly appreciated.
    -gary (a.k.a. Javascript newbie)

    Hi,
    Only your messages use the session state. The code would use the entered value, but you would need to change:
    var homes = parseInt(document.getElementById('P8_HOMES_PER_YEAR1'));to
    var homes = parseInt(document.getElementById('P8_HOMES_PER_YEAR1').value);so that "homes" becomes the numeric version of the value of the item
    Normally, for the label, you would just enter an ID="xxx" into the HTML Table Cell Attributes for the label which you can then use in your javascript. For some reason this doesn't seem to want to work in this page.
    What you could do is find all the labels and then check which is the right one before showing/hiding it. Something along the lines of:
    var xx = document.getElementsByTagName("LABEL");
    var zz;
    var label;
    for (zz = 0; zz < xx.length; zz++)
    if (xx[zz].htmlFor == 'P8_ESTIMATE_JUSTIFICTION")
      label = xx[zz];
    xx[zz].style.display = 'none';
    {code}
    Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

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

  • Hide Show, Programmatically in Seeded page.

    Hi All,
    I have to add one hide show region in a standard page advance table region. The following are the steps i followed.
    Created one custom region for the detail Region.
    Created the custom VO for detail region.
    Created a vie link between the seeded VO and custom VO
    Imported this custom region
    Extended and substituted the base page VO to add one more column for the hide/show.
    Extending the controller i applied the detail Region to the base page Table using setDetail method.
    When i run the page, Its showing the hide/show column and also the detail region - but its throwing the error View object not found ( Custom VO for custom detail region) and showing no search conducted in detail table. Since the Application module of the page is Root Application Module, i cant extend it. So i cant substitute the AM.
    Is the approach i am trying to follow is correct?? Any help/suggestion will be highly appreciated.
    Regards,
    Ram

    Urgent Issue... ..
    Any help Please..

  • Why am I not getting the buttons of Hide/Show, Refresh, Back, Home, Options ?

    Gorgeous Hello All,
    If anyone of you can please provide me a solution for the following, will help me in plentious and galore.
    Am using Adobe RoboHelp, Version 10 and IE version being 10.
    A hurdle :-
    When I File -> View -> Primary Layout : I am getting only these options of Search, Hide, Contents, Index, Glossary, Print being displayed on the screen, eventhough I have ticked for Hide/Show, Refresh, Back, Home (Home -> Advanced Properties -> Home : and declared the respective url as well) , Options  courtesy View -> Pods -> Project Set-up -> Double Click on Windows -> Double Click on NewWindow.
    Why am I not getting the buttons of Hide/Show, Refresh, Back, Home, Options when I File -> View -> Primary Layout ?
    Cheese - Vipin Nambiar

    Hey Piyush Buddy, where were you since my morning !!! :-) :-) :-)   Your simple question here made me realize where did I make the slip of my brain and now all the desired buttons are appearing on my screen. 
    I just made simple parameter changes called View -> Pods -> Single Source Layouts -> Right Click On Microsoft HTML Help -> Setted as Primary Layout (earlier my Primary Layout was setted up for Multiscreen HTML 5).
    THANKS GALORE Piyush buddy - Your simple question to me made a mammoth and galores of help to get my train on track.

  • Automatically hide show spaces page

    Hi we are using Oracle Webcenter Spaces 11.1.1.5. Need to find if there's a way to automatically hide and show a spaces page on a specific time of the day.
    Thanks

    Hi ,
    Use a backing bean to define the rules, Extend the webcenter spaces to add it as shared library ,
    Use it in the visible property of the navigation model to acheive this functionality.
    Let me know if it helps..

  • Large number of Hide/Show regions on a page, can't hide on page load

    I have a large number of Hide/Show regions on a page, 14 right now to be exact. I want all of these regions to start hidden when the page loads. In order to do this I have the following code in the onload page html body attribute:
    onLoad="document.getElementById('region3').style.display = 'none';
    document.getElementById('shIMG3').src = '/i/htmldb/builder/rollup_plus_dgray.gif'
    document.getElementById('region19').style.display = 'none';
    document.getElementById('shIMG19').src ='/i/htmldb/builder/rollup_plus_dgray.gif'"
    This works fine when I have 13 or fewer hide/show regions on the page. When I add the 14th region to the page, all the regions on the page start off as not hidden.
    Anyone have any idea why this could be happening? (I'm using Apex version 2.0)
    Thanks
    - Brian

    no ideas?

  • How to hide/show book, page, portlet programmatically

    Hello,
    The situation is I have few books and have pages within the books. In page, I have few portlets. The problem I try to solve is when user login, based on user role, I selectively show the books, pages and portlets.
    Can anyone give guideline on this ?
    Thanks in advance,
    Li

    "Chris Xu" <[email protected]> wrote in message
    news:8877896.1094662465884.JavaMail.root@jserv5...
    The situation is I have few books and have pages within the books. Inpage,
    I have few portlets. The problem I try to solve is when user login, basedon
    user role, I selectively show the books, pages and portlets.
    Can anyone give guideline on this ?Use entitlements for this, see
    http://e-docs.bea.com/wlp/docs81/adminportal/help/VE_OV.html
    Gerald

  • POP LOV and Branching ( Partial page refresh)

    I have a POP LOV (Shows description and returns id). I want to change certain elements on the screen based on the user selection.
    It is not possible via POP LOV. I cannot use selection lov since the number of values returned is going to be very large.
    is it possible to achieve this functionality in any way using POP LOV ?
    Appreciate your help.
    Rgds

    Scott,
    Thanks for your input. I think I didn't frame my question correctly, sorry about that. I will describe further
    I want the page to refresh after a value is chosen using POP LOV. THis is required to hide/show certain elements on the screen and also to populate another Dependant LOV.
    For example, choosing country should populate dependant "city" or states lov. I have to achieve some functionality similar to this. I do not want to "Submit" the page, because I don't want to save anything at this point in time.
    So it would be partial page refresh (Similar to OA Framework) without submit.
    Rgds,
    Venkatesh
    Message was edited by:
    Venkatesh_pr

  • APEX Hide/Show Keep Expanded or Collapsed Upon Form Submit

    Hello all,
    I have a hide/show region that I'd like to keep expanded after clicking expand, entering something in a search entry box and clicking "Go". When the page refreshes, with the report results, I'd like the hide/show region to remain expanded. And I don't want it to collapse unless the user explicitly collapses it.
    I tried working with Carl Backstrom's Sticky Hide/Show code but I'm afraid that
    A) It seems to have been designed to work well with multiple pages (which I'm not necessarily trying to do ... I've only got one page I'm working with in this instance), and
    B) Template 20 (the one I am working with) seems to be somewhat (very?) different from Template 18 (the last template I see that Carl provided example edits for).
    So ... has anyone else tried this? Or is there a website or blog entry or forum thread I could look at that would provide me with the starting point for the direction I'd like to go with this?
    Any information or advice you can provide would be most appreciated.
    Kind regards,
    Melanie

    I have the same issue - did you ever come up with a solution?
    Thanks, Stephen

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

Maybe you are looking for