473,327 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

collapsible panel

I have a collapsible panel that opens and closes with javascript. I also have a link button on the page. I want that when someone clicks on that link, it should open the collapsible panel and focus on a specific button. The problem that I have is that until the panel is open I can't have the panel open I can't have javascript scroll me down and by then it's too late. My collapsible panel is really just a bunch of divs. They are in a user control on an aspx page. I tried calling the same function to open and close the panel on this asp button click event just like i do in the user control. I figured if this opens the page it can then scroll and i can use server side code to focus. It doesn't seem to react to the code. I guess cause this button is not in the divs? i hope someone has an idea for me, i'm getting very frustrated.

Expand|Select|Wrap|Line Numbers
  1. <script language="javascript" type="text/javascript">
  2.  // current animated collapsible panel content
  3.  
  4. var currentContent = null;
  5.  
  6. function togglePannelAnimatedStatus(content, interval, step)
  7. {
  8.     // wait for another animated expand/collapse action to end
  9.     if (currentContent==null)
  10.     {
  11.         currentContent = content;
  12.         var expand = (content.style.display=="none");
  13.         if (expand)
  14.             content.style.display = "block";
  15.         var max_height = content.offsetHeight;
  16.  
  17.         var step_height = step + (expand ? 0 : -max_height);
  18.         toggleChevronIcon(content);
  19.  
  20.         // schedule first animated collapse/expand event
  21.         content.style.height = Math.abs(step_height) + "px";
  22.         setTimeout("togglePannelAnimatingStatus("
  23.             + interval + "," + step
  24.             + "," + max_height + "," + step_height + ")", interval);
  25.     }
  26. }
  27.  
  28.  
heres my html
Expand|Select|Wrap|Line Numbers
  1.  <asp:LinkButton ID="btnEdit" runat="server" Text="Edit" OnClick="btnEdit_Click" OnClientClick="togglePannelAnimatedStatus(this.nextSibling,50,50)"></asp:LinkButton>
  2.   <uc:CollapsePanel id="CollapsePanel" runat="server" />
  3.  
Sep 1 '10 #1
0 1382

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ram | last post by:
hi! can you suggest me a collapsible panel/groupbox for winform. thanks!
2
by: probashi | last post by:
Hi, I have couple of AJAX collapsible panels in one of my page. I would like the page to remember the state of the panel (is Expended ) property (i.e. user comes to my page and expands a panel...
1
by: probashi | last post by:
Hi, Is there any events associated with collapsible panel related to expand and collapse behavior. I would like to execute some code (either client side or server side) when any of these...
5
by: ting ting | last post by:
I am working on a ASP.net 2.0 version and I want to click a button to open a window. I was using window.open to write at vb side. Response.Write("<Script...
1
by: mahesh123 | last post by:
I am using Collapsible Panel in my project.But in other form of my project i want to use collapsible panel inside other Collapsible panel.Is it possible. Both panels are to be dinamic.Is it possible...
4
by: Garima12 | last post by:
I have 3 collapsible panel extenders containing other controls on my web page. Initially, I am loading one on page load. I want to collapse other 2 panels on click of any one out of those three as...
0
by: =?Utf-8?B?R2lvcmdpbw==?= | last post by:
Hi, I am having a problem and I need some help. I have a listview with a collapsible panel that has a updatepanel and listview inside updatepanel and I have a button that triggers the...
0
by: wojski696969 | last post by:
Hi.. I'm using ASP.NET AJAX Control Toolkit. I've got collapsible extender (CE) putted inside of modal popup extender (MPE), and there is a problem if i scroll the page when collapsible area is...
1
by: BillE | last post by:
I would like to create my own collapsible panel for a winforms application in vb 2008, and I would appreciate any tips. Thanks Bill
5
by: veenna | last post by:
i have a grid inside a collapsible panel in my page. on expand of collapsible panel i want to bind data to grid. how can i do this? how to get the events of collapsible panel. please help ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.