Show hide element problem

I'm trying to do something that can be achieved with Javascript.

< script language = "javascript" >
function showHideComment (onOff) {}
If (onOff == 1) {}
document.getElementById('commentArea').style.display = "";
} else {}
document.getElementById('commentArea').style.display = 'none ';
}
}
< /script >

< input type = "radio" name = "comment1" value = "1" onClick = "showHideComment (this.value); "> To < br / >
< input type = "radio" name = "comment1" value = "0" onClick = "showHideComment (this.value); ' > Off

< cfoutput query = "showcomment" >
< table width = "100%" border = "0" align = "center" id = "commentArea" >
< b >
< td > subject: < table >
< td > < class b = "sidebar" > #subject # < /b > < table >
< /tr >
< /table >
< / cfoutput >

but the problem here is when it:

that hides a single comments Section, what if I had more than 10 comments.

I tried the changes of variables but no luck

Help, please

Thanks it worked...

Tags: ColdFusion

Similar Questions

  • Avoid complete when page is rendered dynamically show/hide elements in a page

    Hi experts,


    I use Jdev 11.1.1.5. My use case does not show/hide multiple buttons/panelBoxes on the same page.

    My approach is to define the rendered property pointing to a session variable

    <af:panelBox  rendered="#{sessionScope.render_panel1}"
    <af:commandButton action="#{backingBeanScope.myBean.configureRenderButtons}" rendered="#{render_button1}"/>
    

    .. .and go to the same page by using an action method in a managed bean:

    public String configureRenderButtons() {
       JSFUtils.storeOnSession("render_panel1", "true");
       JSFUtils.storeOnSession("render_button1", "false");
       ...
      return "same-page.jspx"
    }
    

    My problem is that I noticed that this full page is rendered whenever I press the button. So as soon as the page has grown in size, it became a bit slow for end users.

    Could you please advice on this?

    Kind regards

    Jose.

    I got the solution.

    I changed:

    (1) changed to visible, rendeded

    (2) partialSubmit added to the button

    (3) partialTrigger added to the component I need to show/hide (panelBox)

    (4) action changed to actionListener

    
    
    

    Hope this helps (and hope it's a good practice, please post!)

    Jose.

  • Show/hide the problem and playing of the symbols

    Hello.

    I have a problem with the instructions Show/Hide and play - my problem here:

    I have 4 buttons (symbols) in the stadium: "sectionOption1a_Btn", "sectionOption1b_Btn", "sectionOption1c_Btn" and "sectionOption1d_Btn".

    I also, what I call, 4 'options': 'Option1a', 'Option1b', 'Option1c', 'Option1d'.

    Each of these symbols of 'Options1X' have a 'melted' and 'melted' animation - 0 ms and ms 2000, respectively (within them).

    Each button runs each own option:

    "" 'sectionOption1a_Btn' ' CLICK ' symbol 'Option1a' tracks

    "" 'sectionOption1b_Btn' ' CLICK ' symbol 'Option1b' tracks

    "" 'sectionOption1c_Btn' ' CLICK ' symbol 'Option1c' tracks

    "" 'sectionOption1d_Btn' ' CLICK ' symbol 'Option1d' tracks

    All "Options1X" are hidden, except one that is active.

    The problem:

    Let's say I have "Option1c" active and I want to go to the "Option1a". So, I click on "sectionOption1a_Btn". When I do this, I want the "Option1c" to run is "bland out' (inside himself, to 2000 ms) and then run " Option1a" 0 ms - it is own"fade"while keeping all the other "Options1X" hidden, of course."»

    I hope that I didn t more complicated my explanation.

    Here´s a schema:

    Schematic Control buttons.jpg

    Thanx.

    Hi there, you can implement such a feature in 2 tracking variables. YER essentially saying 'currentOption' to unfold on click of a button and the definition of the "requestOption" according to the click button. At the end of the coast anim current outro, yer by calling the 'playRequest' function to play the requested side.

    Put this question to the stage.compositionReady event:

    var currentOption = null; / / a, b, c and d

    var requestOption;

    called by the event of timeline.complete at the end of each Option

    sym.playRequest = function() {}

    sym.getSymbol("Option1"+requestOption).play ("is");

    currentOption = requestOption;

    }

    called when the button is clicked

    sym.btnClick = function (request) {}

    requestOption = request;

    {if (currentOption)}

    sym.getSymbol("Option1"+currentOption).play ("fadeOut");

    } else {}

    sym.playRequest ();

    }

    }

    Put this on a button click:

    sym.getComposition () .getStage () .btnClick ("a"); / / or b, c and d for each button

    Put this question to the event timeline.complete of each Option symbol:

    sym.getComposition () .getStage () .playRequest ();

  • Show/hide elements - how to hide an image when you click on another

    I have a page of the library of photo with 10 pictures on it. I organized it where there is a large image on the left side of the page and 10 thumbnails of turning on the right. I put larger images in separate AP div tags hidden. I want the big picture is displayed when the user clicks on the corresponding thumbnail. This works well, but how to make the image of 'hide' when the user clicks on a different thumbnail.

    Can you help me?

    Here is my code:

    < div id = 'eau1"style =" position: absolute; " Left: 20px; top: 50px; Width: 630px; height: 491px; z-index: 100; visibility: hidden; "" "> < img src ="... / media/images/water/water1.jpg "width ="650"height ="500"alt ="eau1"> < / div >
    < div id = "water2" style = "position: absolute;" Left: 20px; top: 50px; Width: 630px; height: 491px; z index: 103; visibility: hidden; "" "> < img src ="... / media/images/water/water2.jpg "width ="650"height ="500"alt ="water2"> < / div >
    < table width = "100%" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td width = "20" height = "20" > < table >
    < td > < table >
    < td > < table >
    < td > < table >
    < td width = "20" > < table >
    < /tr >
    < b >
    < height td = "20" > < table >
    < height td = '30' class = "copy18grey" > water Applications < table >
    < td > < table >
    < td > < table >
    < td > < table >
    < /tr >
    < b >
    < td > < table >
    "" < td width = "650" height = "500" rowspan = "5" valign = "top" > < img src = "... / media/images/water/water1.jpg" width = "650" height = "500" alt = 'eau1' > < table >
    "" < td = '100' height > < a href = "#" onMouseOver = "MM_swapImage ('Image12 '", '... / media/images/water/water1_thmb_over.jpg',1) "Mm_swapimgrestore" > < img src = "... / media/images/water/water1_thmb.jpg" name = 'Image12' width = "160" height = "100" border = "0" onClick = "MM_showHideLayers ('eau1',", 'show') ' onDblClick = "MM_showHideLayers ('eau1',", 'hide') "" > < /a > < table > "
    "" < td > < img src = "... / media/images/test.jpg" alt = "" width = "160" height = "100" > < table > "
    < td > < table >
    < /tr >
    < b >
    < td > < table >
    "" < td = '100' height > < a href = "#" onMouseOver = "MM_swapImage ('Image13 '", '... / media/images/water/water2_thmb_over.jpg',1) "Mm_swapimgrestore" > < img src = "... / media/images/water/water2_thmb.jpg" name = "Image13" width = "160" height = "100" border = "0" onClick = "MM_showHideLayers ('water2',", 'show') ' onDblClick = "MM_showHideLayers ('water2',", 'hide') "" > < /a > < table > "
    "" < td > < img src = "... / media/images/test.jpg" alt = "" width = "160" height = "100" > < table > "
    < td > < table >
    < /tr >
    < b >
    < td > < table >
    "" < td = '100' height > < img src = "... / media/images/test.jpg" alt = "" width = "160" height = "100" > < table > "
    "" < td > < img src = "... / media/images/test.jpg" alt = "" width = "160" height = "100" > < table > "
    < td > < table >
    < /tr >
    < b >
    < td > < table >
    "" < td = '100' height > < img src = "... / media/images/test.jpg" alt = "" width = "160" height = "100" > < table > "
    "" < td > < img src = "... / media/images/test.jpg" alt = "" width = "160" height = "100" > < table > "
    < td > < table >
    < /tr >
    < b >
    < td > < table >
    "" < td = '100' height > < img src = "... / media/images/test.jpg" alt = "" width = "160" height = "100" > < table > "
    "" < td > < img src = "... / media/images/test.jpg" alt = "" width = "160" height = "100" > < table > "
    < td > < table >
    < /tr >
    < b >
    < td > < table >
    < td > < table >
    < td > < table >
    < td > < table >
    < td > < table >
    < /tr >
    < /table >

    Show/hide behavior is not just for a single element.  With a single application of the behavior, you can display an image and 24 other people hide.  The trick is to keep by selecting the named items and their visibility, that is, to select "img1" and click display, then select "img2" and click Hide, etc.

  • DPS for ipad. navto: / / Show/Hide button problems.

    Hello

    And yet when I seem to have a problem.

    At the beginning I had buttons that link to a URL like navto://article in a State of the object. This does not work so I decided to place the buttons on another layer and hide the button until is triggered. But it does not work. I'm doing something wrong?

    Marc Smalbrugge

    I found it already! Wrong article update will not help... Now, it does not work!

  • Show/hide the elements if the rule is set to true on one of the many elements

    I'm sure I'm missing something really obvious but I've tried a few things and I can't get this to work...

    I need to show the element X if none of the elements A, B or C = 'Y '. Similarly, I want hide the element X if all a, B and C = 'n'.

    I tried to create a single action with A, B and C contained in the 'when' list of items and I tried also create separate stocks for A B and C, but both methods result in X being shown/hidden based on the last element that was changed, do not take into account the other fields.

    For example, if A and B are both equals Y, then I B = N, X is hidden. It must always be displayed as a still is equal to Y.

    What is the correct way to do it? Thank you.

    Hello

    create 1 dynamic action "to change" of P1_A, P1_B, P1_C

    Then set the status of the dynamic measurement JavaScript and enter the javascript, something like (assuming that the fields of the form are P1_A, P1_B, P1_C):

    $v ('P1_A') == 'Y ' |

    $v ('P1_B') == 'Y ' |

    $v ('P1_C') == 'Y '.

    And then set the true action to display the P1_X field

    Concerning

    Bottom

  • Problems with reset toggle buttons that show/hide captions

    I have a problem with the buttons toggle that I use to show/hide a number of legends about a single slide of the reset. The rocker works very well on the first button when I click on and off to show or hide a legend. A simple click on and watch legend. One click off the coast and the legend disappears. However, if I leave a legend that is displayed and click on other buttons to show/hide the other legends, they do not show or hide in a single click. They require two clicks. It seems that something continues the read head after that first toggle is used until there is a second click. The same thing happens if I reset to enter action. If I click on a caption and leave it in place and move to another slide, it disappears when I re - get this initial slide. However, it requires two clicks, not one alone, to display the legend. I find it very strange; I learned most of my techniques from the Lilybiri blog, but this problem does not occur on his examples. I think I'm missing something obvious, but may not know what it is. Any help is very appreciated.

    if_aa.jpg

    else_aa.jpg

    reset_aa.jpg

    Yes, I use Cp6. What I wanted to say about re-use, is that I have different scenarios where a similar script could be used, if your suggestion of a model is a good. My original intention was to write it in a txt for reference. Thank you very much for all your suggestions and links. I'll keep you posted.

  • Show/hide an element with the click of a button - Script works does not in Firefox

    Hi all

    Basically, I'm looking for show/hide a DIV with the click of a button.

    The script works in IE but fail in FF.

    I am sure that I am the problem here.

    <script type="text/javascript">

    function toggle(box) {
         var el = document.getElementById('box');
         el.style.display = (el.style.display != 'none' ? 'none' : '' );
         
         
         value = document.getElementById('content').value;
         if(value=="Show Calendar"){
         document.getElementById('content').value="Hide Calendar";
         }
         else{
         document.getElementById('content').value="Show Calendar";     
    }
    }
    </script>


    <style type="text/css">
    #box{
         background-color: #C0C0C0;
         height: 100px;
         width: 100px;
    }
    </style>
    </head>

    <body>

    <div id="box">
    </div>

    <input id="content" value="Hide Calendar" type="button" onclick="toggle(box)" />
    </body>
    </html>

    WE

    He also worked if you had changed-

    
    

    on this subject.

    
    
  • Problems with the layout themed to show/hide the region 25

    Hi all, Ive hit another question that I hope someone can help with...

    APEX 4.2.4 on XE... Theme 25.

    I've reproduced this login as apex.oracle.com [email protected] password newpass 291 3 application page.    (admin/admin is also implemented as a UN/pw)

    I have a skin region see the this Im using as a region of select query. There are a number of boxes, and a couple of display only fields that have values returned in it.

    I I set out them in a row, and after 3 items, I start a new line with the other 3 articles... that is

    X X X

    X X X

    Except that with the region set to show/hide and the model of the value without tab, no sidebar I get.

    X X

    X

    X X

    X

    If I change the standard region it works OK, and if I change models, it seems ok.  Ive tried all the combinations of columns, etc, but nothing helps...  Im trying to figure out if Im missing something, or I've hit a bug any... (almost certainly the old...) ...

    Thank you very much indeed

    Richard Legge wrote:

    I have a skin region see the this Im using as a region of select query. There are a number of boxes, and a couple of display only fields that have values returned in it.

    I I set out them in a row, and after 3 items, I start a new line with the other 3 articles... that is

    X X X

    X X X

    Except that with the region set to show/hide and the model of the value without tab, no sidebar I get.

    X X

    X

    X X

    X

    If I change the standard region it works OK, and if I change models, it seems ok.  Ive tried all the combinations of columns, etc, but nothing helps...  Im trying to figure out if Im missing something, or I've hit a bug any... (almost certainly the old...) ...

    The difference between the models of the region is that the Standard region has defined Points of view and the show/hide does not work. This is the mysterious properties that Oracle has not yet bothered to document. Their omission of this model is indeed likely to be a bug.

    Create a copy of the region show/hide template and add a point of view for the body of the region (content):

    Name: Body of the region

    Substitution of template: BODY

    Grid Support: Checked

    The maximum fixed grid columns: - 1


    Use the new model to show/hide for the region of select query.

  • Show/hide field on all pages problem

    I try to use a script to show/hide document level menu (via a drop-down list) field on a 6 page document.

    If my domain is named "P1.field" on page 1, P2.field on page 2... How can etc, I do for States to field by doing the same?

    Right now my state of field changes on page 1 only.

    Just do it to all fields... Either in a loop or one by one. You can use something like this, for example:

    for (var i = 1; i)<=6;>

    this.getField("P"+i+".field").display = display.hidden;

  • Show/hide region when the drop-down list is changed

    Hello

    I need show/hide a region when dropdow (selection list) is changed.

    I used dynamic action:

    Event : change
    Selection Type : Item(s)
    Item(s):P50_my_list
    condition : JS expression
    $v('P50_my_list') == 1
    
    True Action :
    Action : Execute JS Code
    Code : $('#region_name').show();
    
    // OR use Action ==> Show
    
    

    False Action :
    Action : Execute JS Code
    Code : $('#region_name').hide();
    
    // OR use Action ==> hide
    

    But the region has still shown!

    Also, I used a JS function (in the dynamic action of the place) but I met the same result.


    function showHideRegion(pValue)
    {     var show_or_hide = $x(pValue).value;
        if (show_or_hide == 1)
          {$('#ALTERNATIVEN_LIST').hide();}
        else
          {$('#ALTERNATIVEN_LIST').show();}
    }
    
    
    

    Hello

    I solved the problem with the js function:

    function showHideRegion (pThis, pValue)

    {var show_or_hide = $x (pValue) .value;}

    If (show_or_hide == 1)

    {

    var element = $x_UpTill (pThis, 'DIV');

    Element.style.display = 'none ';

    } else {}

    var element = $x_UpTill (pThis, 'DIV');

    Element.style.Display = "block" ;}

    }

  • Show-hide sticky acts!

    By using the behavior show hide to reveal a series of images on our web page, and if you fly over the elements quickly skin doesn't seem to be able to do its job. Is this just an inherent problem with behavior? I have the page in test mode on. Mac. No links beyond this page are available, but maybe someone can give me a clue as to why this is happening. Its at http://homepage.mac.com/ibexcom/.public/samples_nsts.htm

    In this case, I write a little script that hides all layers. I have add this
    at each outbreak of layer to show before the behavior that shows the layer there
    supposed to.

    onMouseOver = "hideAllLayers (); MM_showHideLayers [...] »

    I think there is an extension to
    http://www.Projectseven.com
    makes this kind of layer management.

    --
    James M. Shook
    http://www.jshook.com

  • I found the show/hide button toolbars, but you should know how to REMOVE toolbars that appear on this list?

    I found the show/hide button toolbars, but you should know how to REMOVE toolbars that appear on this list?

    Is attached a screenshot of my screen with the context menu to show/hide tabs. I want to delete some of them and let others. Please help me to know how. Thank you!

    Hmm, maybe this "one-time" imported into the new preference? Try this:

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste the cust and make a pause so that the list is filtered

    (3) double-click the preference of browser.uiCustomization.state and the content must be highlighted in a small dialog box.

    (4) copy the whole line and paste it into Notepad and save it as a backup.

    (5) in Firefox, click on the button '3-bar' menu > developer > Notepad. Remove the comment that appears and paste data preferably, that must appear on a long line. Click on the "Pretty Print" button to make it more readable.

    So I hope that you can spot the extra toolbars and change them out, taking care to preserve the commas between the elements.

    I don't have the extra toolbars in mine, but I copied and pasted back this spaced format and Firefox was able to handle it well. I went into customize and moved a button, and when I left, Firefox has rewritten the preference set as a single line. Assuming that yours works fine, then you can get rid of the backup from step (4).

  • Is there a keyboard short/shortcut to show/hide bookmarks bar?

    I would like to have in options > bookmark unchecked and a shortcut key, or key shortcut to show or hide the bar bookmarks.
    Checking takes room, and the score addons mouse autohide sometimes annoying when your going to type in the URL bar and not use the bookmarks.

    Y at - it a keyboard shortcut for this.
    Thank you in advance.

    Is there a keyboard short/shortcut to show/hide bookmarks bar?

    There is no shortcut keyboard corresponding to the bookmarks bar.

    'Alt' displays the menu bar
    ' Ctrl + / ' activates / deactivates the add-on bar
    "Ctrl + K" shows the search bar because it's his entry area.
    "Ctrl + L" shows the address bar because it's his entry area.

    But there are alternatives, and you can configure the zombie fashion with the extension 'hide automatically", then that is the only toolbar, hidden or not hidden, even if I don't do it.

    You can use F11 to toggle mode full-screen that hides the toolbars and the title bar.

    On Windows, you can use AutoHide - http://www.krickelkrackel.de/autohide
    which provides a window mode full ('zombie mode') with 'SHIFT + F11"similar to full screen, but within the limits of the window that allows you to display only the title bar, with the options I use with it always display bars tabs and addons in full screen or full window mode.

    In full-screen or full window, you can move the cursor to the top and see toolbars, use F10 or Alt to see the menu bar, use Ctrl + K to see the search bar, use Ctrl + L to see the address bar. To show the Favorites bar, you will need to show all toggle F10 or F11 to toggle toolbar.

    My bookmarks toolbar takes up very little space less vertical space that shows this before and after photo, see Articles 61 to 66 on the style in the following:

    You can make Firefox 6.0 look to Firefox 3.6. *, see numbered items 1-10 of the next topic difficulty Firefox 4.0 UI toolbar, problems (make Firefox 4.0 to 6.0, resemble 3.6). If you make changes, you must be aware of what has changed and what it takes to use changed or missing features.

    It is much more beyond these first 10 steps in the list, if you want to make Firefox more functional.

    Please mark "resolved" a response that will better help others with a similar problem - hope it was her.

  • Script to show/hide the menu bar in the preferences

    Hi all

    First of all, my knowledge of script is fairly limited, so bear with me, okay?

    So, I was wondering if you could write a script that activates / deactivates the system preferences to show or hide the menu bar? I found this article http://goo.gl/Q8udo , but like I said, I have very limited knowledge about scripts, hilarious is actually what I want is beyond what I can do.

    Anyone with the knowledge and patience to share the line of code necessary to do this?

    Thank you very much!

    Rui

    Why would you not just select the system of general preferences setting to automatically hide and show the menu bar? Move the pointer of your mouse at the top of the screen and the menu bar appears until the mouse retired. Application launch does not cause the bar menu to reappear and once revealed, shows the elements of the application menu. OS X 10.11.3.

Maybe you are looking for