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.

Similar Messages

  • 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

  • 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

  • Need to Show/hide text on later page dependent on Button

    Ok, I am VERY new to Acrobat forms.  I am trying to use Acrobat X to build a large custom survey PDF form to be used on a variety of Tablet platforms (PC/Android/Mac) so I am trying to limit any "special" coding that different platforms might not support.
    I have scanned the discussion boards and found lots of close examples, but nothing quite fits.
    Situation is like this.  I have a LOTS of Radio Boxes, and Pull downs (16 pages worth)
    Condition Red List
      [ ] Condition One
      [ ] Condition two
      [ ] condition three
    Condition Green List
    [ ] Condition One
    [ ] Condition two
    [ ] condition three
    Some are exclusive (only one valid choice) others support multiples ( condition one AND three)
    Easy so far....
    SEVERAL (16) PAGES LATER there is a SUMMARY page where I want to display (or not) the descriptive Text associated with SOME of the earlier choices.
    Pretty Summary Header, date project numbert etc....
    Disclaimer text Bla Bla Bla
    The follwoing is a SUMMARY of the major issues from the previous pages
    White summary : This is the Text associated with White condition two. this could be a line, a list of things, or a paragraph
    Red    summary : This is the Text associated with Red condition three. this could be a line, a list of things, or a paragraph
    Green summary : This is the Text associated with Green condition two. this could be a line, a list of things, or a paragraph
    Green summary : This is the Text associated with Green condition three. this could be a line, a list of things, or a paragraph
    More disclaimer text
    I understand (sortof) that I can have a Variable "red_list_1" that can be true/false and that will affect a line/field back on the summary page....
    The following is a cut-n-paste ROUGH of what I think I need... it hasn't been tested (yet) and I am sure there are typos.  There are LOTS of examples of scripts that make things appear/dissapear (like the following) but I am trying to find a SIMPLE one that will the best when there are lots of them....
    var f = this.getField("Red_list_1");
    if (f.value==(true))
        g.display = display.hidden;
    else
        g.display = display.visible;
    Ok...a couple of things I don't yet get...
    Can I combine statements/functions like I used to in (insert old language here) like
         if (this.getfield("Red_list_1").value)==true then g.display = display.hidden else g.display = display.visible
    On my Summary page, do I need lots of fields that hide/disappear, or can I build one Monster field with lots of stuff inside it?
    If I have lots of fields, how do I get them to flow nicely together?
    My form is HUGE (16 pages of questions) , so I will have lots of text that 'can' be copied to the summary page, is there an easier way to build such a thing?
    Lastly, and this is may be a question unto its self... If the "Summary" needs to go onto a 2nd (or more) page, how do I make sure it will "flow" nicely?
    Note: The nice thing is that the filled in form -IS- the final product.  I don't need to upload it, syncronize it, or otherwise send it anywhere.  I will save the filled in form for reference and edits (if needed) but the client get a copy of all 17 pages (16 + summary) and thats it.
    Oh yes...I am using Acrobat as it works, is supported, and doesn't need the cloud and will run on standalone devices with no cloud connectivity.  Once the surveyor has the form they can go anywhere with it, complete the form, even print a copy of it, without needing to upload anything.
    Thanks for the help, I have been working this for a while, and keep getting partial solutions, some that work great, but are really really messy to try to do on a large scale, others use lots of stuff supposedly not supported on the Apple Ipad reader. (everything I have tried has worked???, not sure the issue)

    Hi,
    You have a couple of different options, You can have a condition on the form and report. So you choose the condition as something like Request = Expression 1 for the form and enter CREATE. Then in the report user Report != Expression 1 and enter CREATE. That way it will show the report all the time except when CREATE is pressed.
    If you want to make it a bit more sophisticated you can use a Dynamic Action, so you have a dynamic action that has a true action of show the form and another true action of hide the report and then the opposite way round in a a false action and set the false action to fire on page load.
    Hope this helps
    Thanks
    Paul

  • 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

  • Show/Hide Regions using list (Button List Template)

    Hi,
    I have a page on which i'm using list (Button list - Template). Below lists, I have multiple form regions. When a user opens that page, all regions should be visible and the focus should be on 'Show All' list. However, Region 'Terms' should only be visible when list 'Terms' is selected. The same functionality should apply to other regions and lists. I have seen that Oracle has used a similar functionality when an Item on a page is clicked or opened.
    Does anybody know how to do it?

    I'm trying to use the hide/show region in the posting to hide a button region when I click the button.
    When I click my button it calls SubmitCmd(sCmd) and hits the alert popup "Here we go!" but then all the AJAX inserts happen and THEN the region hides.
    I guess the alert is Async and the $x_Hide(l_Item); is not or something like that??
    How can I hide the region and then process the rest with the same button click?
    Or how can I hide just a normal button when I click it.. same thing though, need to do it before processing of AJAX inserts.
    function SubmitCmd(sCmd){
    var lQuesID;
    var elmName;
    var elm;
    lcontinue = true;
    showMessage('');
    alert('Here we go!');
    $x_Hide(l_Item);
    var lAdtUseID =html_GetElement('P3_AUDIT_USE_ID').value;
    etc.. a bunch of AJAX inserts, etc..

  • Javascript Help Needed Again

    Hi there, I am not very good with Javascript, so was looking
    for some help.
    I have a select list for an order checkout page, which is
    basically how
    people heard about the site. You select one, and depending on
    what it
    is, another form field will appear with a message asking for
    more detail.
    For instance, if they selected Search Engine, another field
    would appear
    with the text "Which search engine" and a form field for them
    to enter
    it into.
    What is the best way to do this? Some of the options in the
    select list
    won't need the additional field.
    Cheers,
    Steve

    Dooza wrote:
    > Dooza wrote:
    >> Hi there, I am not very good with Javascript, so was
    looking for some
    >> help.
    >>
    >> I have a select list for an order checkout page,
    which is basically
    >> how people heard about the site. You select one, and
    depending on what
    >> it is, another form field will appear with a message
    asking for more
    >> detail.
    >>
    >> For instance, if they selected Search Engine,
    another field would
    >> appear with the text "Which search engine" and a
    form field for them
    >> to enter it into.
    >>
    >> What is the best way to do this? Some of the options
    in the select
    >> list won't need the additional field.
    >
    > Ok, I have almost got this sussed, just need some syntax
    help :)
    >
    > function toggleElement(sel1, element1) {
    >
    > element1 = document.cart.elements[element1];
    > //alert(element1.value);
    > if (sel1.value == 'searchenginelisting') {
    > element1.value = 'Which search engine?';
    > element1.style.display = 'inline';
    > }
    > if (sel1.value == 'searchenginesponsored') {
    > element1.value = 'Which search engine?';
    > element1.style.display = 'inline';
    > }
    > if (sel1.value == 'banner') {
    > element1.value = 'Which website?';
    > element1.style.display = 'inline';
    > }
    > else {
    > element1.value = ''; // input text will be empty
    > element1.style.display = 'none'; // hide text element
    > }
    > return;
    > }
    >
    > It currently only works when you select banner from the
    select list.
    > When you select the first 2 it does nothing. Its the way
    its nesting the
    > IFs, can anyone tell me how to sort this out?
    >
    > Cheers,
    >
    > Steve
    function toggleElement(sel1, element1) {
    var element1 = form.elements[element1];
    if (sel1.value == 'searchenginelisting' ||
    sel1.value == 'searchenginesponsored'){
    element1.value = 'Which search engine?';
    element1.style.display = '';
    return;
    if (sel1.value == 'banner') {
    element1.value = 'Which website?';
    element1.style.display = '';
    return;
    element1.value = ''; // input text will be empty
    element1.style.display = 'none'; // hide text element
    Mick

  • Math.min JavaScript help needed

    Hello,
    I am trying to write a script for a fillable PDF in Adobe Acrobat, but I don't have much experience with JavaScript and I need some help!
    Basically I have three fields as follows:
    A1 = a field with a number value in it
    B1 = a field with a number value in it
    C1 = a field where the sum calculation will be.
    I want to write a script that will enter the lesser of the values in A1 and B1 into C1. If no value has been entered into B1, then it enters the value of A1 into C1.
    This is what I have come up with so far:
        // Get the field values, number fields as numbers
        var d1 = getField("A1").value;
        var d2 = +getField("B1").value;
        // Set the field value to either A1 or B1, whichever is lesser
         event.value = Math.min(d1,d2);
    Some of the problems with the script so far are:
    It does not calculate correctly if there is no value entered in B1 (should give just A1).
    It doesn't update the event.value if A1 is changed (until another form field is modified)
    Can anyone help??
    Thanks!

    Adjusted the field calculation order fixed question 2.
    The script given as answer worked great except for one area.
    B1 values can range from 0 and up. If a 0 is entered in B1, then the Math.min ignores it since d2=="".
    I can get around that problem by having a default value set in B1 of -1 (outside of the range). I'd prefer that there not be a default value set.
    Any suggestions? I appreciate the help.

  • If/then JavaScript help needed

    Hello,
    I am trying to write a script for a fillable PDF in Adobe Acrobat, but I don't have much experience with JavaScript and I need some help!
    Basically I have five fields as follows:
    A1 = a checkbox
    B1 = a field with a number value in it
    C1 = a field with a number value in it
    D1 = a field with a number value in it
    E1 = a field where the sum calculation will be.
    I want to write a script that will enter the sum of values of B1+C1+D1 into E1 if the checkbox in A1 is checked yes.
    If it is not checked yes, then it will enter the sum of values of B1+C1+ the value of D1 divided by 2 (and rounded down) into E1.
    Can anyone help??
    Thanks!

    This should do it as the custom Calculate script for E1:
    // Custom calculate script
    (function () {
        // Get the field values, number fields as numbers
        var a1 = getField("A1").value;
        var b1 = +getField("B1").value;
        var c1 = +getField("C1").value;
        var d1 = +getField("D1").value;
        // Set this field (E1) value based on the state of the check box
        if (a1 === "Off") {
            event.value = b1 + c1 + d1;
        } else {
            event.value = b1 + c1 + Math.floor(d1 / 2);

  • Javascript Help needed

    We have a requirement to not display report until the user selects some requirements, and we also need to ensure a user has selected a value for certain prompted columns.
    As such, we have written a custom Javascript for a custom "Go" button on our dashboards. The JS validates the required fields and generates a Go URL which loads into an iFrame when the custom button is clicked. This works fine in Internet Explorer, but in Firefox the prompt values are not being passed into the Go URL string. This is a security risk as it shows all data on the report when it shouldn't for certain users. Can anyone look at the JS code below to see why it won't work in Firefox?
    Thanks
    removed code, sorryEdited by: odinsride on Feb 10, 2011 9:17 AM

    if(navigator.appName == 'Microsoft Internet Explorer')That would be the reason your code doesn't work in Firefox - most of it is inside an IE-only if clause!
    Surely there must be a better way to achieve your requirement rather than to use all that javascript. One technique I've used to force a user to make a prompt selection is to use nonsensical default values on your prompts. By doing this you are guaranteed that the report will give 'no results' when it is first run. You can then add a no results view to the report and add your own custom message saying 'please make some selections from the prompts above'.

  • Help needed in showing Order Quantity in Quantity contract

    Dear, Gurus
    I know it is possible to show the Target Quantity and Order Quantity both in the Display view of my quantity contract. It is said that you have to click the update document Flow which I know I have done in copying control. But no matter how many release orders I make the only thing displaying in my contract is still the Target Quantity and I want the Order quantity to also show but it isn't. I am using Item cat Tan for my Release Order and Item Cat KMN for my Quantity Contract.
    i have copied OR to ZORS (Release Order)  and CQ to ZCQ.
    Copying Control
    Target is my Release Order Source is my quantity Contract
    copying Req is 301
    pos/neg quantity is +
    copy schedule line is checked
    copy quantity is A
    Pricing Type is G
    X=Update document Flow.
    Please help.

    Dear Mr. Jimmy,
    Thanks for the reply. I tried writing the query in the stored procedure but its not working.
    It would be grateful if someone can send me the query for this to put in the Transaction Notification.
    Regards,
    Bharath S

  • Javascript help needed (confirmation for cancel button )

    Hi guys!
    I am not good at javascript but am going to improve shortly :-). Now i need very quick fix.
    I'm using <html:cancel> button in Struts 1.1 and I'm using without thinking the following code:
    <html:cancel onclick="bCancel=true;" >
    <bean:message key="cancel.operation"/>
    </html:cancel>
    It is not that important though. I would like very much to alert user on possible loss of data (long multipaged form - could press mistakingly, who knows).
    Would you, please post the javascript code that is needed to accomplish this - just alert and if yes - cancel, no - leave alone?
    I'll really appreciate this.

    Thank you for your response.
    I also manage to write this. Is this correct?
    <script language="JavaScript">
    function ensure() {
    return confirm("Are you sure that you want to cancel this operation?");
    </script>
    <td colspan="3" align="center">
    <html:cancel onclick="bCancel=ensure();" >
    <bean:message key="cancel.operation"/>
    </html:cancel>
    </td>

  • Images with hyperlink in javascript - help needed

    Hai,
    I am having two hyperlinks say, "Good Morning" and "Good Evening". When I am clicking "Good Morning", a small arrow or a picture should display with the hyperlink.
    When I am clicking "Good Evening" this one should have the small arrow or a picture and "Good Morning" will be displayed normally (without picture).
    How can I do this using javascript?
    Did anyone has the code? Pls help me.
    <html>
    <head>
    <title>
    Moves the Arrow When Clicked the Headings for Sorting purpose
    </title>
    <SCRIPT language="JavaScript">
    function remove_picture() {
    function set_picture() {
    </SCRIPT>
    </head>
    <body bgcolor="peachpuff" width="90%" align="center">
    <table>
    <tr>
    <td align="left">Good Morning</td>
    <td>Good Evening</td>
    </tr>
    </table>
    </body>
    </html>
    - yogee

    <html>
      <head>
        <style type="text/css">
          #notclicking .highliter {
            display: none;
          #clicking .highliter {
            display: inline;
        </style>
        <script type="text/javascript">
          function showHighliter(elem) {
            elem.id="clicking";
          function hideHighliter(elem) {
            elem.id="notclicking";
        </script>
      </head>
      <body>
        <a href="#" id="notclicking"
           onfocus="showHighliter(this);"
           onblur="hideHighliter(this)">
          <img border="0" class="highliter"
               src="http://forum.java.sun.com/im/duke.gif"/>
          Good Morning
        </a><br/>
        <a href="#" id="notclicking"
           onfocus="showHighliter(this);"
           onblur="hideHighliter(this)">
          <img border="0" class="highliter"
               src="http://forum.java.sun.com/im/duke.gif"/>
          Good Evening
        </a><br/>
      </body>
    </html>

  • Javascript help needed if possible

    I am trying to combine code from codaslider and shadowbox, but whatever I try, my code is basically rubbish!!
    I want to combine the following two links in to one:
    <a rel="shadowbox[Mixed];width=640;height=360" href="#">
    <a class="xtrig" href="#1" rel="coda-slider-3">
    I am fairly certain that all I need to do is combine the two 'rel=' parts of the code to get it working. Basically, what I am trying to do is stop codaslider from sliding when I click and instigate the shadow box. Is it possible?
    TIA
    Mat

    No, it can't be done. JSP code runs before the HTML page is generated; it's a server side technology. JavaScript runs on the client's machine, after the page has been rendered.

  • Show/Hide tabs in top level navigation of a role based on assigned services

    Hi,
    I have an interesting requirement. I have created an overview page in abap web dynpro which has links to various services.
    Based on the r3 roles assigned to the user, we need to show/hide the services in the overview page and top level navigation.
    I can show/hide the views in the overview page but the links on top level navigation are created in the portal frontend by creating worksets, iviews, etc.
    Is there a way I can show or hide these worksets which are defined in the role on top level navigation?
    In a nutshell, can i update the visible/invisible property of a java workset from a call in abap web dynpro?
    Regards,
    Sumeet

    Please refer the framework page [http://help.sap.com/saphelp_nw70/helpdata/en/02/c7918e9fca44519701c47028a053fd/content.htm|http://help.sap.com/saphelp_nw70/helpdata/en/02/c7918e9fca44519701c47028a053fd/content.htm]
    What i meant was that you can do a custom TLN like this
    [http://help.sap.com/saphelp_nwce711core/helpdata/en/42/fd515a2aa95277e10000000a1553f7/content.htm|http://help.sap.com/saphelp_nwce711core/helpdata/en/42/fd515a2aa95277e10000000a1553f7/content.htm]
    Seems to me java/jsp is more appropriate than doing it via WDA.
    ANother way that you might look into this is Application integrator which again java programming effort needed.

Maybe you are looking for

  • "iPod can not be read from or written to"

    Need a little help from the experts. I've scoured Apple's support site, this site and several others for mention of an error that reads like this: "Unable to read from or write to disk "(insert iPod name here)". Here's what happens: Open iTunes Plug

  • Unable to add new dimemsion members to empty dimension library

    Hi All, I'm installing a development version of HFM 9.3.1 onto Windows Server 2003. Everything seems to have gone OK after carefully following the installation guidelines. The problem i'm getting is not being able to create a new dimension member in

  • Color Correction: different result in Frame Viewer and Canvas

    Hi all: I´m doing some color correction with the 3 way CC tool and i´m having troubles with Frame Viewer: the results are not the same in the Canvas and Frame Viewer. The colors in Frame Viewer are a little bit more saturated and they are also a bit

  • Creation with Reference using BAPIs

    We're looking into creating an order with reference to a quotation or a return order with reference to an order or invoice. According to OSS note 370988 you can only achieve this using a workaround. We're in the process of testing it, so we were wond

  • Workflow between CC apps is a nightmare

    So I have Creative Cloud which I thought would be great to use with all the applications working nicely together....NOT! Example: • I've worked on some vector icons using Illustrator CC, now I want to turn them into a sprite sheet. Correct me if I'm