Show  / Hide image on button click

I have a button that when clicked through an advanced action will show a tick graphic.
This works fine but what I would like to happen that if the button is pressed again the tick will disappear.
Also if the button was pressed for a third time the tick graphic would reappear, and so on.
What is the most efficient way of doing this?
Many thanks in advance.
Viki

Here we go (again). Sorry, but I have answered similar questions so many times. Here is an article that offers you several toggle button scenarios:
Toggle Shape buttons - Captivate 6 - Captivate blog
Steps for your use case, since you don't want to change the look of the toggle button:
create a boolean user variable v_visib ; you can give it a default value of 0
create a conditional advanced (or shared) action like this:
IF v_visib is equal to 1
  Show im_x                where im_x is the image you want to show, in a shared action will be a parameter
  Toggle v_visib
ELSE
  Hide im_x
  Toggle v_visib

Similar Messages

  • Show waiting image on button click till response comes

    Hi All,
    I want to show waiting image on button click in a jsff page till response comes from back-end.
    For this I am using following code in button :-
    <af:commandButton text="Submit" id="cb1"
    actionListener="#{RegistrationManagedBean.onRegisterClick}"
    binding="#{RegistrationManagedBean.registerButton}"
    inlineStyle="width:65px; height:34px; font-size:11px; font-family:verdana; color:#fff; border-color:Gray; border-style:solid; border-width:1px; background-image:url(&quot;images/template-related/template_new/ButtonEnabledBG.png&quot;); background-repeat:repeat-x; float:right;"
    styleClass="button">
    <af:clientListener method="enforcePreventUserInput" type="action"/>
    </af:commandButton>
    enforcePreventUserInput is written inside on .js file.
    js code is :-
    function enforcePreventUserInput(evt) {
    var popup = AdfPage.PAGE.findComponentByAbsoluteId('pt1:r1:p1');
    if (popup != null){
    AdfPage.PAGE.addBusyStateListener(popup,handleBusyState);
    evt.preventUserInput();
    function handleBusyState(evt){
    var popup = AdfPage.PAGE.findComponentByAbsoluteId('pt1:r1:p1');
    if(popup!=null){
    if (evt.isBusy()){ 
    popup.show();
    else if (popup.isPopupVisible()) {
    popup.hide();
    AdfPage.PAGE.removeBusyStateListener(popup,handleBusyState);
    Popup code is :-
    <af:popup id="p1" contentDelivery="immediate">
    <af:dialog id="d2" type="none" closeIconVisible="false"
    inlineStyle="background-color:none !important; width:54px; height:55.0px;">
    <af:image source="/images/template-related/LoadingCircle.gif" shortDesc="Loading" id="i7"/>
    </af:dialog>
    </af:popup>
    This is working and image is also being shown but this image is not shown as transparent(where as image is transparent) and also image is having top and bottom shading which is because of dialog or popup. But i dont want this shadow. Also inline style is not working for this popup.
    If there is any other way to solve this purpose please suggest.
    Thanks
    Edited by: 915148 on Jun 4, 2012 1:19 AM

    Ok, we will use a movieclip button but is there a tutorial somewhere on how to display the image when the button is clicked?

  • Show/hide panels on button click

    Hello,
    I have to show/hides several panels on same palette on some button actions. I am trying to check whether it is possible to add each child panel in different .fr files.
    Just to brief,  On panel I have different icon buttons and on each button I have to show different view in the main panel thus I cannot use tabular dialog. Please help me to find a way to achieve this?
    I tried following code
    I have Created two primary resource panel in TestSample1.fr,TestSample2.fr files respctively.
    My main panel (Palette panel) have two buttons (TestSample1Button,TestSample2Button).
    I want to show/hide these panels on button click in main panel.
    InterfacePtr<IPanelControlData> parentPanelCtrlData(Utils<IPalettePanelUtils>()->QueryPanelByWidgetID(kMainPanelWidgetID) ); // main panel
    if(parentPanelCtrlData)
        InterfacePtr<IControlView>         testSample1PanelPanelView((IControlView*)::CreateObject(::GetDataBase(this),kTestSample1P anelWidgetBoss,IID_ICONTROLVIEW));
        if(testSample1PanelPanelView)
            parentPanelCtrlData->AddWidget(testSample1PanelPanelView);
    I have added above code on TestSample1Button observer.But it is not working.
    is It possible? can anybody help me?

    Yes it is possible.
    I am not sure but following line of code also needed after adding widget .
    testSample1PanelPanelView->ForceRedraw(testSample1PanelPanelView->GetDrawRegion(), kTrue);

  • Show an image on button click

    We need the button to display an image on a button when clicked for a tic tac toe game.  Any help would be helpful.

    Ok, we will use a movieclip button but is there a tutorial somewhere on how to display the image when the button is clicked?

  • Reg : show/hide subforms under buttons in Static page(Java Script)

    Hi All ,
    I am creating Adobe Interactive form(static page). In this page have 3 buttons.For each button one subform is there. I want to show/hide subforms under buttons.
    I am using javascript. Please give me the code for this.
    Thanks
    Risha

    Hi Risha,
    can you explain your question like do u have some condtions to show or hide the subform? OR if u click
    button you want to show the subform and by default subform should be hidden something like this?
    Normally for showing the subfrom on click of the button: (By default make your subform invisible from its properties).
    Select the button and in the click event select java script option and write the following code:
    Subform.presence = "visible";
    (*you have to give full path of the subform instead of only subform name).
    With Regards,
    Ravi

  • How to show/hide individual radio buttons in a single radio button list

    Can I apply javascript to checkboxes in order to show/hide individual radio buttons in a single radio button list?

    Thanks, Niall,
    I'll give it a try . . .
    Yours,
    Robert Anderson
    SWRCB WebSupport
    1001 I Street
    Sacramento, CA 95814
    8th floor 59B
    (916) 341-5950
    [email protected]
    >>> Niall O'Donovan <[email protected]> 8/5/2010 1:47 PM >>>
    Hi,
    Yes, it can be done. You just need to reference the actual button, rather than the radio button group.
    It is best if you name the radio button group AND all of the individual radio buttons.
    If the radio button group was named "myRadioButtons" and the three rb were named "yesRB", "noRB", and "maybeRB". All of this is in the hierarchy.
    Then this script in the click event of the checkbox would work:
    if (this.rawValue == 1)
         myRadioButtons.maybeRB.presence = "hidden";
    else
         myRadioButtons.maybeRB.presence = "visible";
    Hope that helps,
    Niall

  • Show/hide HTML Region with click on a Button

    Hi,
    is it possible to Show or hide a HTML Region if o want to use a Button for hide or show the region?
    Can  everyone explain it to me?
    Thx for all
    René

    Hi,
    htmlRegionId can something like dataDiv
    In Header section of the region 
    <div id="htmlRegionId">
    In Footer section of the region
    </div>
    on Page level javascript
    <script type="text/javascript">
    function showHideRegion(){
         $("#htmlRegionId").toggle();
    </script>
    On Button Click Action redirect to URL and enter the following text
    javascript: showHideRegion();

  • Hide/show a form upon button click

    Hi
    I want to show/hide different form upon button clicks. Also I want to clear the data from a form upon button clicks. How can I achecive this? Thanks in advance.

    Hi,
    Create one boolean variable in your datastore. Click of the button should set the value to false and you can bind the same variable to the visibility property so that you can hide and display accordingly. For making the values blank, you can put condition on the detault value formula IF(!<your datastore variable>,"",<value needed>)
    Regards,
    Murtuza

  • Show/hide image

    Hi!
    I have one JSP page with h:graphicImage. I want this image to be rendered or not rendered based on some criteria (maybe button click would render image and next click wouldn't).
    State is saved in managed bean. Say I click button so image is not currently visible on screen and go on next JSP page. On this page I click back and go back to first page and image is visible again. Altough managed bean state is different.
    How can I hide/show image based on state of managed bean before page is loaded? Probably I should work something out with listeneres but I'm not sure. Any tips or pointers are welcomed.
    Regards,
    Matjaz

    You should be able to do something like:
    <h:graphicImage rendered="#{managedBeanName.rendered}" ... />
    Have the managed bean return a boolean based on the current state of your bean. If the method returns true, the image will be rendered otherwise if false, it won't.

  • Show chart region when button clicked??

    Hi All,
    i'm using apex 4.0
    initially i want to hide chart region,when clicked on button i want to show chart region...
    i have tried Dynamic actions ,show/hide but no hope...
    any one help me on this.. :)
    thanks in Adv.

    1. Firstly, make sure that the Chart region has a region template.
    2. If you don't want to use Dynamic Actions try something like the following:
    In the Region Definition set the Static ID = chart
    set the Region Attributes => style="display:none;"
    for the button set the URL = javascript:$("#chart").show();
    Cheers
    Shunt

  • Home Page loads slowly because of too many show/hide images.

    I was asked to create a home page that displayed the correct product image in the background as you mouse over the menu item in the product portfolio navigation.  I built the page using quite a few show/hide behaviors displaying the correct image.  Now I have a HUGE home page that loads very slowly. Is there a better way to accomplish the same affect or do I need to scrap this idea and keep the images on the individual pages?
    You can see this page here:  http://www.keystonewalls.com
    (mouseover the PRODUCT PORTFOLIO button and scroll down the menu to see the affect)
    The client loves the fact that you don't have to leave the home page to get a good idea of what each product looks like but they aren't happy with how long it takes to load.
    Help!

    Yup.  You've got some trimming to do. 
    http://www.websiteoptimization.com/services/analyze/
    On a T1 connection (1.41 MB/sec) your home page takes 18.50 seconds to load.  For dial-ups it's a very painful 395 seconds. 
    Page size:  1,943,483 bytes.   Should be closer to 200 KB.
    HTTP server requests: 41.  This should be around 10.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • How to upload Images to azure media services and show the image on on click on Link?

    Hi,
    I want to upload the image to the Azure media service asset and show the Link on the page. When use clicks on the Link I want to show it user. How can I implement this with C#? Now I am uploading the image to asset as in the normal way and getting the URL
    for that. But I am not able to show it user when he click on the image link.
    Thanks,
    Pavankuamr H K

    HI
    Azure media services has a RESTful service and a C# SDK that you can use to interact with the Azure Media Services.
    Here is the documentation and sample code for calling the Media services and using the SDK:
    https://msdn.microsoft.com/en-us/library/dn735908.aspx?f=255&MSPPError=-2147217396
    Aram Koukia | Blog: koukia.ca | Twitter:
    @aramkoukia

  • Show an image for incorrect click box response

    Is there a better way to show a "Please Try Again" image for a click box response?
    1.  Add click box.
    2.  Set to 1 attempt
    3.  If clicked correctly, advance to next slide.
    4.  If clicked incorrectly, continuing playing current slide
    5.  Add "Please Try Again" image in timeline to show AFTER click box Pause.
    6. If I want to allow multiple failed attampts before moving to the next slide, duplicate items 1 - 5 above, adding it later in the timeline,
    The above method works if Quiz Scoring is turned off.  If Quiz Scoring is turned on, would I have to start using variables to score the quiz?  Each click box would set a variable to TRUE once they get the question correct, whether it was the first attempt or the third attempt.
    Micky

    BTW - This is Captivate CS5.
    Just thought of a better solution.
    After incorrect, redirect to the beginning of the current slide, so it plays from the beginning again.  this way, I would have to duplicate a click box and "please try again" image 3 times for 3 attempts in the same slide.
    However, this method would not let me specify the number of attempts, unless that was stored in variable.
    hmmm....
    One second thought, it may be better to just duplicat the items to reflect the number of attempts I want on that page.  This would let me include a highlight box after the last attempt so they can learn where to click correctly.  We don't want them caught in an endless loop of ignorance! 
    As for scoring, I wouldn't have to use variables if I directed them to a "Correct" screen that as a "Click to continue" click box that gave them the point.  Though that might be a little clunky.
    Thanks for letting me think through my problem on this forum.  ;-)

  • Adobe Captivate 8 create a toggle between show/hide image

    Hello,
    Does anyone know how I can create a action with a button that toggles between shows or hides a image.
    Thanks in advanced for helping.

    BTW since you are on CP8, don't use an advanced but a shared action. The only parameter will be the image. You can then use that action over and over again, even in other projects. For another project: open the Library of this older project in the new project, drag the Shared action to the library of the new project. The variable v_visib will be automatically created, and when using that shared action, you'll just have to define the parameter (image), or you can even replace the image by another object or by a group.
    You can feel that I like shared actions, not everyone agrees with me however.

  • Display an image on button click?

    Hi,
    I'm using Captivate 3 and trying to set up an image to be
    displayed in a certain position on the screen when a button is
    clicked. It would always be on the top layer to overlay anything
    else on the screen at the time. I need to do this for multiple
    slides so it would be way too confusing to try to use multiple
    slides to accomplish this.
    I am thinking it might be javascript? (I don't know what the
    code would be though) But I realize it might just be another trick.
    I thought this would be a popular request but searching in the
    forums and Google hasn't yielded anything helpful yet.
    Thanks!
    -Dan

    Hi Rick,
    Let me back up a step and explain the issue with my project.
    I'm creating an interactive software simulation using png images of
    the application pages and inserting click boxes and buttons to give
    the illusion the user is in a 'real' training environment. The
    application is a windows based one, with three types of navigation;
    tabs, icons and menus. Creating the tab navigation was pretty
    straightforward, I put an image of each tabbed page on its own
    captivate slide and included click boxes to link the proper tabs to
    the proper pages. Looks pretty good so far.
    My challenge is with the menu options. I would like the user
    to be able to select a menu option, see the drop down image of the
    choices, click on the choice and go to the correct new page. The
    challenge is the layering and timing. The menu options are on the
    same pages as the tab page images, the timing is already tied into
    what needs to happen with the tab images. So I was hoping if I
    could find a way to put a hot spot over say, the File menu, have
    the menu options appear, and have the user click on an option to be
    taken to the new page. Using the timeline, I set the first menu
    option to pause at 1.5 seconds, then the new menu option image
    would appear after clicking, then a hot spot on the menu option
    image would take the user to the new correct page. Still with me
    If I use the timing feature, and click on a menu for the drop
    down image to appear, then all the drop down images appear. That's
    why I think your idea of a success caption is potentially
    brilliant. I tried making a custom caption by selecting Success
    Caption>Custom and then selecting the image bmp that I saved in
    the Adobe Captions gallery. On previewing, the image is not in the
    success caption. So I looked further at the gallery and the images
    there have files with .FCM extensions. Looks to be some type of
    text file, not sure?
    So... <whew> there's my dilemma. Bottom line I am
    looking for best practices to create a software simulation (without
    using motion recording because I also need to create these in large
    quantity with minor image changes... John Doe and Jane Doe and
    such) when the software has integrated tab, menu and icon
    navigation.
    Your thoughts?
    thanks
    Karen (working with Dan
    )

Maybe you are looking for