function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rocio VivancoRocio Vivanco 

Cancel button should render second outputpanel in a group of two outputpanels

Hi all,

I have this part of code, which is an outputpanel and renders the second outputpanel when a condition is met.
Now I want to implement the functionality for the button CANCEL, so by clicking on that button the second outputpanel disappears.

I couldn't find any examples in order to show how this can be done.

Did anybody have experience with this?

 
Stephanie DodsonStephanie Dodson
some javascript should do the trick.  here is an example of a button i did that with.

<script type="text/javascript">
    
        function KillSubmitButton(){
var obj= document.getElementById('cmdSubmit')

 
obj.style.visibility = 'hidden';

}
    
    </script>
 <apex:outputpanel id="Buttons">
                
                <input type="button" value="Submit" id="cmdSubmit" onclick="KillSubmitButton();mysendorder();" class="btn" />
                    
                </apex:outputpanel>
Rocio VivancoRocio Vivanco
Sorry, that doesn't help me further. I can create a button and add javascript code as you did in your example, but doesn't answer my question unfortunately.