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.

Similar Messages

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

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

  • Using JavaScript to Hide/Show Items

    Hello
    Trying to use Javascript to check a List Item value.
    IF List Item value IS NULL THEN
    HIDE some other items
    ELSE
    SHOW some other Items
    I managed to locate some code to determine a NULL value.
    This works and I even can display a an alert message
    When I attempt to Hide the other Items, nothing happens
    Any Help on this matter - Urgently required for a Deadline
    Here is the code I am using :
    function show_InvestigatorData(){
    var lCheck = html_SelectValue('P1000_INVESTIGATOR_ID');
    // if Investigator populated, show the Investigator fields
    if(lCheck &&
    lCheck != '' &&
    lCheck != 'null' &&
    lCheck != '' &&
    lCheck != ' '){
    alert('this value is ' + lCheck);
    html_ShowItemRow ('P1000_INVESTIGATION_START_DATE');
    else {
    // otherwise hide the Investigator fields
    alert('this value is null');
    html_HideItemRow ('P1000_INVESTIGATION_START_DATE');
    Many Thanks in advance
    Ade

    Ade,
    Carl Backstrom has a great sample site with examples of what I believe you are trying to accomplish:
    http://apex.oracle.com/pls/otn/f?p=11933:5:661046971170606::NO:RP::
    From either the menu or the index, select Javascript and then "Show/Hide/Toggle Form Items".
    Hope you don't mind the plug Carl.
    MovingTarget

  • Captivate: Using Javascript to show/hide text captions

    Hello,
    I want to show/hide a text caption using javascript. I can't find the way of doing it with advanced actions. I dont know if it's because it belongs to a question slide in a pool. Does somebody knows if it's possible and how it can be done??

    You can set the length of the variable when you insert it.
    15 characters is just the default setting.
    What I meant by COULD is that the kind of thing you are asking about here (using JavaScript to hide objects inside a Captivate movie at runtime) is not as simple as you'd like it to be.
    JavaScript is not my particular area of expertise, but there are some people that chime in on this forum that ARE experts at JS. But I think they would also be the first to say that it's not as simple a thing to pull off as just "knowing the command to hide/show an object".
    The easiest tool to use in Captivate for showing or hiding objects is Advanced Actions.  The next easiest thing to use is ActionScript 3, and that's hard.  JavaScript is a very useful programming language, but it spends all of its life outside the Captivate movie looking in through AS3's External Interface.  So JS alone is not going to solve all your issues.

  • Hide/Suppress section using WebElements

    I am trying to set up a button on my report using WebElements to hide a section/group based on a value in a formula. Not having much luck..
    Any help would be appreciated
    Regards,
    David

    I don't know webelements, but can't you format the group/section to suppress based on the value?

  • Using Quicken to manage a bank account, I get an error message from the bank that cookies and javascript must be enabled, but I don't get that message when I connect with Internet Explorer.

    Firefox allows me to get the bank home page through Quicken. But when I try to login, the error message appears saying "cookies and javascript" must be enabled. I have Java on my system, but in Firefox under "tools/options/ I don't find any way to "enable" javascript. I have enabled "cookies".
    I have no problem logging in at the bank site using Internet Explorer, but to use it, I have to designate it as the "default browser" before connecting through Quicken. I'd rather keep Firefox as the default.
    A bank tech representative was unable to find any commands in Firefox that would deal with this problem, although she clearly had manuals for both Internet Explorer and Firefox. So she concluded that I would have to use Explorer for this operation, since it allowed control of security level settings. She said that in Explorer, security level should be set to medium.
    Is there some similar control in Firefox?

    Firefox uses the same "security level" setting that is set in IE.
    Tools > Options > '''Content''' <br />
    Is '''Enable Javascript''' check-marked?
    http://kb.mozillazine.org/JavaScript_is_not_Java
    If that doesn't solve your problem, do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • How to Hide some Rows in a List view Web Part using JavaScript ?

    How to Hide some Rows in a List view Web Part using JavaScript ?

     Here is the code that worked for me:
    var Elements = document.querySelectorAll('div[id=WebPartWPQ3] table[class=ms-listviewtable]>tbody tr .ms-vb-lastCell.ms-cellstyle.ms-vb2')
    for(var i=0, n = Elements.length; i < n; i++)
     if(Elements[i].innerHTML=="India")
    Elements[i].parentNode.setAttribute("style","display:none")
    WebPartWPQ3 -> ID of webpart Div
    ms-listviewtable -> class name of table in Div
    ms-vb-lastCell.ms-cellstyle.ms-vb2 -> classname of td to get text

  • How to hide a table row in pdf  using javascript?

    How to hide a table row in pdf  using javascript?

    This is only possible with LiveCycle Designer forms, not PDF forms created
    in Acrobat.

  • ERROR MESSAGE WHEN USING PACK COMMAND   Missing file ////presenter.css   Also:  "This course requires JavaScript to be enabled in your browser. Please enable JavaScript, then relaunch the course."  I have Java enabled in all browsers

    ERROR MESSAGE WHEN USING PACK COMMAND   Missing file ////presenter.css    Command then fails
    Also:  "This course requires JavaScript to be enabled in your browser. Please enable JavaScript, then relaunch the course."  I have Java enabled in all browsers
    Thoughts?  Using Presenter 10  Win 8.1  Intel I7  new HP with plenty of memory
                   Thanks

    I had saved one copy as an .asp but then resaved it to .xhtml 
    I'm assuming this is a static web site.  Rename (F2) all your pages with .html or .htm extension. 
    .xhtml is not a valid extension.
    Nancy O.

  • How to hide/disable menu items using Javascript in Acrobat 9 pro or later

    We just wanted to know on how to hide/disable menu items for e.g. 'Open' menu item under 'File' menu in Acrobat 9 or later on Mac using Javascript. It would be useful if you could provide if any other option is in place already.

    Not sure it will work, but you can try using the app.hideMenuItem() method. See reference here.

  • Conditionally Hide Dashboard Pages using Javascript.

    Hi, I would like to share a small logic i developed to Conditionally show or hide Dashboard Pages based on a Repository Variable.
    In the last few weeks we noticed that the ETL jobs scheduled everyday were failing due to various obvious reasons. As a result, Our Dashboard are greeting the users with "No Data to Display Messages". Most of our Sales Dashboards are defaulted to show business health as of yesterday (Sysdate -1). If ETL scheduled everyday at 3 am failes, then the Dashboards show no data. Emails from Users, etc. etc........
    For a few days we were manually trying to post some messages on Dashboard something like "Please come again, Our Data for yesterday is not yet loaded........".
    I thought it would be nice to hide the Dashhboard Pages automatically, rather than manually posting a message whenever data outage or etl job failure occures.
    To do this, I
    1. Identified the table that the ETL folks update at the end of every job. This table has a column to say the status of the load (Successful, UnSuccessful) and also a date column to show the most updated load date and timings.
    2. Created an Initialization block that would go fetch the most recent loaded date and status of the load values. I set this block to fire every 5 minutes.
    3. Created a report with a Date Column and a bogus columns with FX set as the Repository Variable for Load Status. Added filter on the Date as = the repository variable for Load Date.
    4. In the Narrative View of this Report, I added the following JavaScript.
    In Prefix section:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>     
    <script type="text/javascript">          
    var curTable = document.getElementsByTagName("table");
    In Narrative Section:
    var cFlag = "@2";
    In Postfix Section:
    if (cFlag == "UnSuccessful"){
    for (var i = 0; i < curTable.length; i++) {
    if (curTable.className == "PageTable") {
    curTable[i].style.display = 'none';                         
    /*var curBody = document.getElementsByTagName("body")[0];
    var newTable = document.createElement("table");
    var newTBody = document.createElement("tbody");
    var newRow = document.createElement("tr");
    var newCol = document.createElement("td");
    var curMessage = document.createTextNode("Data for this dashboard is currently unavailable due to the daily load process." + '\n' + "Sorry for the inconvenience.");
    newCol.appendChild(curMessage);
    newRow.appendChild(newCol);
    newTBody.appendChild(newRow);
    newTable.appendChild(newTBody);
    curBody.appendChild(newTable); */
    alert("Data for this dashboard is currently unavailable due to the daily load process. Please check back shortly." + '\n' + "Sorry for the inconvenience.");
    </script>     
    </head>
    <body>
    </body>     
    </html>
    Note: I originally wanted to post the message on the Dashboard, but there are some issues with IE 7, with appendChild method. But it works fine with FireFox. So I did not wasted any time on Javascript Errors, rather just had an alert message, that basically does the job i need. I mean tell the users about the ETL Status.
    5. Finally I added this report in the Dashboard. Key point here is the above report should be added in the Lower Column. I mean if there are six Dashboard COlumns aligned as 2 Columns X 3 Rows, I added the Narrative Report on the 5th or 6th Columns.
    When the load status is unsuccesful, the narrative report will hide the Dashboard Sections and shows a message to the users.
    Thanks
    Sai
    Edited by: Sai Kumar Reddiboyina on Sep 23, 2009 5:51 PM
    Edited by: Sai Kumar Reddiboyina on Sep 23, 2009 5:51 PM

    Hi Turribeach, the reason i set it as "Answered" because, I have found the answer by myself and wanted to share with others.
    Also,
    Guided Navigaion is very expensive in terms of performance and I am talking about at least 8 to 10 answer requests per page here.
    Thanks
    Sai

  • How to Hide f:subview using javaScript

    Hi
    In our application i have to hide and show the subview using javascript is it possible i tried like this.. but its not working
    <f:subview id="viewid" >
    // view contents
    </f:subview>
    In java script
    document.getElementById("viewid").style.visibility="hidden";
    Any suggestion to me..
    Regards
    Hari

    The f:subview doesn't render anything to the response. You should know that if you have checked the rendered HTML source.
    Wrap its contents in a h:panelGroup and give it an ID. And don't forget to adapt the clientside Javascript language on the clientside HTML source, not on the serverside JSF source.

  • How hard is it to use javascript to show/hide fields. Is it easier to use the action builder?

    I know nothing about javascript and all that ive been using so far has been stuff ive found on here (thank you everyone).
    Using the action builder seems like its gonna be very tedious to do since i have so many subforms that hide, would it be esier to use javascript?

    I know nothing about javascript myself but I just created a form with about 10 different subform that show or hide depending on what the user chooses from a drop down list and I used Action Builder. If we don't know javascript, how can we use it? But Action Builder did a fine job of hiding/showing wherever I needed it. And Action Builder can do more than one thing by clicking that + sign when you are building an action.
    For instance, I needed to place a button in each subform that would close both the field that the person was working in and also the subform on the next page where the information was going into floating fields in a text block that was only visible thru a drop down list text select. I could have never figured out how to do that based on my knowledge of javascript. Thank Adobe for including Action Builder in this version of LiveCycle and I use it all the time. I find it extremely easy to use but it takes a little mental training to think thru the steps of how you can use the menu in Action Builder to make your form do what you need it to do.
    And if all else fails, ask this forum. I struggle for just so long before I come here and ask for help. I always get the answer I need. I hope you will too.
    Good luck,
    Jeanette

  • Hide an HTML button using javascript

    Hi,
    I need to hide an html buttton using javascript. I have an radio button with values "YES" and "NO". If is select NO then i need hide the button without refreshing the page. Can anyone suggest me how to hide an button using javascript.
    Thanks
    Prashanth

    Prashanth,
    The exact solution will vary based on a few factors. The basic idea is to place an event handler on the radio button item that calls a function to hide/show the button. You might also want to call that function when the page loads too.
    If you put an example page on apex.oracle.com and provide the workspace/username/password I'll take a look. You can create a new account for this purpose.
    Regards,
    Dan
    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/

Maybe you are looking for

  • Unable to change "Your name" in BIS

    I have my Gmail account set up in BIS and everything is working perfectly, however, I am unable to change the "Your name:" field to anything other than what's already there.  I've tried deleting the account and re-adding it in there from the web site

  • Convert CMYK+SPOT (only selected bands) to RGB

    Hello, My context: I am dealing with multi-band TIFF files - CMYK + one or more SPOT colors. I am able to read the multi-band TIFF file using JAI and read the number of bands correctly. Also, I can read the value for any band for any pixel. For the S

  • Help connecting new iPod Nano to iHome radio

    I got an iHome radio with a iPod Nano recharge station (and Nano played through radio's speakers). When I lost that, I got a new Nano, but the belt clip means I cannot push down so that the Nano's insie port connects with the iHome's outsie port. Is

  • Deep linking with richtexteditor

    Hi, I try to do a notification / messaging system for an internal flash application and want ot do some deeplinking to control modules with html fragments. My imagination was to put some parts of the messages into url with given html fragments and us

  • Update problem in JDBC

    Hi, I am using mysql with JDBC , and I try to execute a update like this: update tablename set doc="function test(){ var test; test=1;return test;}" where DocId='11'; It is work well in mysql console. But when i run it in program use JDBC, the result