Home Search Member List Faq Register Login  
UltimatePanel
Re: Close panel with cancel button

Thread Starter: Romain   Started: 01-23-2007 10:08 AM   Replies: 3
 Karamasoft Support Forums » General Discussions » UltimatePanel » Re: Close panel with cancel button
 Printable Version    « Previous Thread   Next Thread »
  23 Jan 2007, 10:08 AM
Romain is not online. Last active: 1/25/2007 9:13:56 AM Romain

Not Ranked
Joined on 01-23-2007
Posts 1
Close panel with cancel button
I have a control panel available to the user to change criteria for some reports. At the bottom of the panel I have a OK and a Cancel button.

I would like to close the panel when the user click on the panel, without reloading the full page. Is is possible to call the hiding function that is called when clicking on the header but from the cancel button?

Thanks

  
  23 Jan 2007, 1:25 PM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: Close panel with cancel button
Currently there is no client-side API to achieve this. However, you can do View Source and find the group id related to that header and set its style display property to none on the client-side. For example, if the name of your panel control is UltimatePanel1, the client-side id of the first panel group will be 'UltimatePanel1H1G' (basically the suffix is HxG where x is the sequence number of the group). You can also find the onclick event handler for the group header in the View Source as follows:

rxCjP936('UltimatePanel1','UltimatePanel1H1');

Then, you can define your own onclick event handler for your Cancel button as follows:

<input type="button" value="Cancel" onclick="if (document.getElementById('UltimatePanel1H1G').style.display == 'block') rxCjP936('UltimatePanel1','UltimatePanel1H1');"

If you want to keep it closed when the page refreshes after Cancel button click, you might want to set ClientPersistence property of your panel control to True.

  
  09 Apr 2008, 12:01 PM
DominoMaximo is not online. Last active: 5/7/2009 10:46:01 AM DominoMaximo

Top 10 Posts
Joined on 11-16-2007
Posts 31
Re: Close panel with cancel button
Little confused on this...

I'm trying to do something similar, I have a panel with the ID value being 'panelWorkflow' where it is the 3rd panel.  So is the client-side id of this panel group 'panelWorkflowH3G'?

I am basically wanting to see a working example of this...  So if anybody has any working code on how to do this... It would be greatly appreciated.


  
  09 Apr 2008, 4:51 PM
Karamasoft is not online. Last active: 11/10/2017 3:24:14 PM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,818
Re: Close panel with cancel button

Can you look at your page view source and make sure that the client-side ID of your panel group is actually 'panelWorkflowH3G'? If you use master pages or user controls, you might get a different id. You can try changing your JavaScript code as follows (assuming that your UltimatePanel server control ID is 'panelWorkflow'):

rxCjP936('<%=panelWorkflow.ClientID%>','<%=panelWorkflow.ClientID%>H3');

<input type="button" value="Cancel" onclick="if (document.getElementById('<%=panelWorkflow.ClientID%>H3G').style.display == 'block') rxCjP936('<%=panelWorkflow.ClientID%>','<%=panelWorkflow.ClientID%>H3');"

 


  
 Page 1 of 1 (4 items)
Karamasoft Support Forums » General Discussions » UltimatePanel » Re: Close panel with cancel button

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.