JavaScript to Hide Region

I would like to hide an entire region based upon JavaScript. I can't use the conditional display of a region because this is on-demand and can't submit the page to check value. I can hide specific values, but the labels remain and the region border remains. Here is what I have so far.
onchange="Show_On_Selectlist_Value('P15_SIRT_DCSN_ID','6');"
<script>
function Show_On_Selectlist_Value(pParent, pValue)
var rv = $x(pParent).value;
if (rv == pValue)
html_ShowElement('P15_RR_COMMENTS');
html_ShowElement('P15_RR_USER');
html_ShowElement('P15_RR_DATE');
else
html_HideElement('P15_RR_COMMENTS');
html_HideElement('P15_RR_USER');
html_HideElement('P15_RR_DATE');
</script>

For the region you want to hide, provide a value for the 'Static ID' attribute. You can then use the built-in javascript functions '$x_Hide(pnd) and $x_Show(pnd) 'to display or hide this region.
example $x_Hide('REGION_STATIC_ID') http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/javascript_api.htm#CHDDAGFE
varad

Similar Messages

  • Javascript Help Needed to Show/Hide Regions

    version 4.0.2.00.07
    Hello,
    I'm hoping that someone would help me with creating a Javascript function to Show/Hide regions.
    I have a Select List defined as Checkboxes that when clicked I would like to show specific regions that contain fields that are specific to that checkbox selection. There are currently four selections available. There are two selections that would show one region and the other two selections would show the other region.
    Please let me know if I need to clarify anything.
    Thanks,
    Joe

    There is an out-of-box solution that may help you - check out the "Customisation" section in the region properties.
    Otherwise, you might like to explore using a Dynamic Action to show/hide your region based on an event on your relevant checkbox.
    Either way, you should have a declarative solution when you thought you might need to hand-code some javaScript :-)
    ps - thanks for providing your Apex version.

  • Dynamic action - show/hide region based on LOV which returns ID

    Hi folks,
    this should be simple, so someone who works with dynamic actions.
    I have a LOV which is based on below query:
    select OBJECT_ID, KOD
      from x_data x;
    retuns:
       ID          KOD
        492961 BMW
        492964 VOLVO
        492960 MERCEDES
        492963 VOLKSWAGEN
        492959 SKODAItem :P200_KOD is based on LOV which displays KOD and returns ID.
    On my page I have also 1 region called TEST_REGION.
    I would like to set up a dynamic action shich will SHOW/HIDE a TEST_REGION based on selected value in item :P200_KOD (LOV). Region should be showed if displayed (KOD) value of selected ID starts with 'V%'
    By other words, if below query returns any record, then SHOW, else HIDE:
       select *
        from x_data x
      where x.kod like 'V%'
         and x.object_id = :P200_KOD;How should I define a triggering condition for dynamic action, for item :P200_KOD?
    Thanks,
    Tomas

    Hi,
    One way:
    Create advanced dynamic action.
    Name : Hide region
    Event : Change
    Selection Type : Item(s)
    Items(s) : P200_KOD
    Condition : JavaScript Expression
    Value :
    $(this.triggeringElement).children("option:selected").html().substring(0,1) !== "V"Action : Hide
    Fire On Page Load : True
    Hide all page items on the same line : No
    False Action : Show
    Fire On Page Load : True
    Show all page items on the same line : No
    Selection Type : Region
    Region : TEST_REGION
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Hide Region When Click On Region Name Then Region is Display

    Hi ,
    I want to hide region click on REGION NAME like This Report
    [http://apex.oracle.com/pls/apex/f?p=267:4:1532929568077413|http://apex.oracle.com/pls/apex/f?p=267:4:1532929568077413]
    thanks

    Hi,
    For that, I have created a "Hide Show Region on Title Click" Region Template
    Create a new Region Template through Shared Components. This should be created "From Scratch" as there is only one setting in the template that requires any content. When that has been created, edit the template and copy the following into the "Template" setting:
    &lt;script type="text/javascript"&gt;
    function toggle()
    var r = $x('#REGION_ID#body');
    r.style.display = (r.style.display == 'none')?'block':'none';
    &lt;/script&gt;
    &lt;table class="t18Region" id="#REGION_ID#" border="0" cellpadding="0" cellspacing="0" summary=""&gt;
    &lt;tbody class="hideshow"&gt;
    &lt;tr&gt;&lt;th class="t18RegionHeader"&gt;&lt;a href="javascript:toggle();"&gt;#TITLE#&lt;/a&gt;&lt;/th&gt;&lt;/tr&gt;
    &lt;/tbody&gt;
    &lt;tbody id="#REGION_ID#body" style="display:none;" class="hideshowcontent"&gt;
    &lt;tr&gt;&lt;td class="t18ButtonHolder"&gt;#CLOSE#  #PREVIOUS##NEXT# #DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td class="t18RegionBody"&gt;#BODY#&lt;/td&gt;&lt;/tr&gt;
    &lt;/tbody&gt;
    &lt;/table&gt;Note that this example uses Theme 18 - so the class names shown here are "t18....". If you are using a different theme, you can find the correct class names from another region template.
    Andy

  • Hide region if no data found in another region

    I have 2 regions on a page.. I'd like to hide the second region if no data is returned by the SQL query in the first region.
    I know that the obivious way to do this is to use the same SQL in the second region and make it conditionally display. But I don't want to run the SQL twice against the database for performance reasons.
    Is there any (preferably easy) way to check the contents of Region 1 from Region 2 and hide Region 2 if Region 1 has no data in?

    Hello,
    You can write a javascript function, that will check whether you report has any rows, if not will some APEX flag item.
    For example, after the report will be fetched you can write something like this:
    <script type="text/javascript">
    var els = document.getElementById('R1708927825979432').rows;
    if (els==0){document.getElementById('P1_FLAG').value=0;}
    </script>
    I'm not exactly sure that it will work, but you can try....
    Best Regards, Kostya Proskudin.

  • Is there any way to hide region names?

    I recently switched from garageband to Logic, and my only complaint is that there isn't a way to hide region names, which would give the same words-free editing experience as garageband.  If anyone knows of a way to do it, please post, thanks!

    Hi
    You could use the Text tool or the Region Parameters to clear the default names:
    CCT

  • Dynamically show/hide regions out of the application workflow

    hi,
    is it possible to show/hide regions of a page dynamically with a "select list with submit" item?
    regards

    Hi,
    Do you mean "Conditionally display" items based on the value of a Select List with Submit?
    Andy

  • How to hide region

    Hi, I created a region in page 0 in my apex application. I understand that anything in page 0 apply to all pages. Anyway my problem is that the region title shows on everything page. Is they a way to hide the region?

    dave_414 wrote:
    Also the region type is html text(escape special characters). I dont have anything in the source but I have  javascript code in the region header.
    Why are you persisting with this flawed approach when it has been repeatedly pointed out that a HTML Text (escape special characters) region is totally unsuitable for use as a JavaScript container? Use a basic HTML region with No Template, put the script in the region source, and none of these absurd workarounds are required.

  • Javascript and hide and show.

    Is there any way to hide single item on the form (not region)?
    I have tried to hide an item based on the condition.
    I have radiobutton with value 1 and 0 so I have created on click event that check its value and hides item but:
    the item that I want to hide is a date item with the datepicker option. What happens that item is hidden but label and datepicker icon stays.
    here is the code
    function HideAndShowElement(fieldName,elementNameToHide)
    if(html_RadioValue(fieldName) == 0)
    $x_Hide(elementNameToHide);
    else
    $x_Show(elementNameToHide);
    Any suggestions?
    Robert

    Hello,
    $x_Hide(elementNameToHide); will only hide the element.
    To hide label .. edit the label of the itme.eg. suppose lable is MY_LABEL make it
    [span id="my_lable_id"]MY_LABEL[span] ( replce [ and ] with < and > )
    and make ur javascript code to
    $x_Hide(elementNameToHide);
    $x_Hide('my_label_id');
    Regards,
    Shijesh

  • Show/ Hide region based on button click

    Hi,
    I have two report regions. When I press generate report button then, one region has to be displayed.
    I have an item "select list with submit " and if select some value from the LOV in the select list then the second region has to be displayed. Over all only one region has to be displayed at a time.
    Thanks in advance.

    See this thread for a possible answer: Hide/Show Region With Javascript
    Thank you,
    Tony Miller
    Webster, TX

  • Using javascript to hide/enable sections on a dashboard

    Hi,
    Version - OBIEE 11.1.1.6.1
    I am trying to display/hide a section based on the user selecting a value from a radio button(variable prompt). These sections contain reports(which use different filter criteria) and have different prompts .
    ie If value A is selected in radio button, prompt C and report D should be visible
    if value B is selected in radio button, prompt X and report Y should be visible
    I am able to do this by using condition(which uses a hidden analysis) on a section but that refreshes/reloads the report sections even before the corresponding prompts are applied which does not provide a good user experience.
    Can this be done by Javascript?
    I am able to hide a section through javascript based on radio button selection by calling - saw.dashboard.onToggleSection('<dashboard-section-id>',null);
    However I am not able to find a way to enable the other section. Has anyone been able to use JS to hide/unhide a section?
    Any suggestions/inputs appreciated
    Edited by: layman on Oct 17, 2012 12:55 AM

    I really don't see why there would be a need to script wildly when you can easily achieve this with conditional reports which are just listening for the values currently in the radio buttons, return some bogus line and then enabling or disabling sections.
    E.g. section condition: ROWCOUNT("DoesTheRadioButtonSayBlaBlaBla") > 0
    C.

  • Using Javascript to hide objects that have no "binding" tab?

    Hello,
    I'm attempting to create a form that uses checkboxes to hide a variety of fields. I've run into a problem though; it seems that only text fields have a binding tab (unless I'm missing something).  Is there a way for me to do show hides for images and text boxes? When I hold ctrl and hover over these items there is a small circle with a red line through it, which seems to express that it is impossible to manipulate them using javascript.
    For the record, I'm using javascript as seen below:
    BusinessDBAname.presence = "hidden";
    If someone had any definite answers on this I'd really appreciate it.

    Hi,
    sorry to say that, but this is a really bad form design.
    There are a couple of things you can make it better.
    1. Give unnamed subforms a suitable naming
    2. Use subforms to organise your form
    3. Don't embed fonts at all when you only use the default fonts Arial or Myriad Pro
    4. Don't select the checkbox to embed images (they will get embedded always but this method requires more space)
    5. Set option to prevent script changes in the form to automatically, otherwise the changes wont be saved
    Ok, I suggest you to create a set of subforms to represent your Section 1 - 9.
    In each subform you then add a subform for business and sole proprietor.
    Into those subforms you then put the desired fields, images etc.
    This allows you much shorter scriptings because you only have to change the presence of the surrounding subforms to show/hide an entire set of objects.
    You form design finally should look something like this.
    form1
         Maserpage
         PayeeSetupRequest
              Section1
                   Business
                        Textfield1
                        Textfield5
                   SoleProprietor
                        Textfield1
                        Textfield3
              Section2
                   Business
                        Textfield1
                        Textfield5
                   SoleProprietor
                        Textfield1
                        Textfield3
              Section3
    Hope this helps.

  • Javascript To Hide/Show Complete LOV Item On Page

    Hi All,
    I am trying to show/hide a page item which is a LOV page item type. I was using the $f_Hide_On_Value_Item which does not hide LOV image. What should I use to accomplish this ? It has to implemented in Javascript. Any help appreciated ...
    Tom

    Hello Tom,
    >> Are there other options ???
    There are usually other options :)
    Scorpio idea is a good start, although I‘m not sure his code cover the label of the LOV item. I think for that you should go one level up in the DOM. Using the ID suggestion he gave you, try using the following line:
    $x('popUp').parentNode.style.display = 'none';That should hide the entire ‘tr’ the LOV item is on.
    Hope this helps,
    Arie.

  • Javascript to hide the end of a video

    About two years ago Dave Merchant wrote in this forum:
    You can deactivate a video (returning to the poster image) using Acrobat JavaScript, but can't make it happen automatically at the end of playback unless you use a custom videoplayer widget. The standard widget doesn't fire an event when playback ends.
    I have a button that is set to hide certain fields on a page. I also want this button to hide the last frame of a video that may have been played on the page.
    Show/Hide Fields won't do it.
    Does anyone know the JavaScript that Dave mentioned.

    George,
    Two things:
    (1) You need to read my post more carefully. Not only couldn't you respond correctly to my JavaScript question, but I never used the words "Shut up." I am not that rude as to tell someone to shut up.
    (2) You really don't know when to quit.
    So, once again I ask you to stop responding so I can concentrate on any answers that may come from those who do know what they're talking about.
    You may not realize it, but some people subscribe to forums using email. All you're doing now is cluttering my phone with your bloviating.
    Seriously. At this point you're not helpful nor funny.

  • Using javascript to hide ap divs

    I want to write a function to hide 8 ap divs on my page, because I need to do this from various places, and using the show/hide behaviour is proving very timeconsuming, as every time I replace my images via the FW generated HTML, I have to reinstate the show/hide behaviour 8 times for each image.  Much easier if I could just call a function.
    I have scoured the net, and come up with various samples along the line of:
    document.getElementsByName('apDivName').style.visibility = 'hidden';
    which I repeat for each apDivName in my list.
    The problem is, I don't know javascript, and have no idea if getElementsByName is the right getElements or if visibility is the right property,but have tried various permutations on this theme.  No syntax error, but the functions called after this function don't run, so something is wrong.

    It's ok, I sorted it.
    document.getElementById('apDivName').style.visibility = 'hidden';
    I'd tried that already, but missed a capital letter in my function name, so it didn't work.  Duhhhh.

Maybe you are looking for

  • SAP NetWeaver 7.01 SR1 ABAP Trial Version Installation Fails

    Hello, While doing SAP NetWeaver 7.01 SR1 ABAP Trial Version Installation, I am getting below error message: ~ An error occurred while processing option SAP NetWeaver 7.0 SR1 including Enhancement Package 1 > SAP Application Server ABAP > MaxDB > Cen

  • Distinct Count in Explorer

    This is from BOB post, which was posted in 2008. Now it's 2013 and there is no solution by SAP? We are doing a POC on Explorer, this is probably time to scrap it. Very frustrating! Is there any Hi, We have 2 tables used in universe "orders" and "orde

  • PI 7.0 Error 500 Internal server error

    Exception Details Exception class: com.sap.aii.utilxi.prop.api.PropertiesException Message Unable to read configuration data (ExchangeProfile/aii.properties) Stacktrace Thrown: MESSAGE ID: com.sap.aii.utilxi.prop.api.rb_all.NO_PROPERTIES com.sap.aii.

  • Database recovery and oracle errors!!

    Hi, all. I got the message that "Media Recovery is complete", but got some errors when applying archive log files. I was able to open database. I am just wondering why oracle gives us error message when applying archive logs in the process of recover

  • Cannot print from windows

    Mac pro running lion with airport extreme for WIFI HP printer connected to airport Prints fine from OS When I send documents to printer in windows printer is recognized but will not print Have updated drivers; reinstalled printer and rebooted mac and