PC Review


Reply
Thread Tools Rate Thread

accordion control css lost

 
 
danstanhope@gmail.com
Guest
Posts: n/a
 
      12th Feb 2008
Hi all,

I have an accordion control that is being dynamically created.
Everything is working as it should, however when I open up a pane and
click another link on the page and then navigate back to the page the
accordion control is on, the selected header CSS is on the wrong
pane.

Has anyone experienced and thing like this?

Any help would be appreciated, Thanks!
Dan
 
Reply With Quote
 
 
 
 
ian.audsley@blueyonder.co.uk
Guest
Posts: n/a
 
      16th Feb 2008
A common problem with the Accordion. The styles also go wrong when an
async postback happens. This script fixes the styles. It simply loops,
and resets the header style for all un-open panes. It's a bit of a
fudge, but works.

There are various methods to get this to run as required, like
registering it as a start-up script with a script manger, or having it
run on document load. It's probably best to build this script on the
server as you need to set the client id of your accordion in it (i.e.
using myAccodion.ClientID). l'll leave the exact implementation to
you:


var acc = $find("xxxxxx_AccordionExtender");
for (var i = 0; i < acc._panes.length; i++)
{
if (i != acc._selectedIndex)
{
acc.get_Pane(i).header.className = acc._headerCssClass;
}
}

Hope this helps.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accordion control for .net 3.5 sp1 is broken? Andy B Microsoft ASP .NET 3 13th Nov 2008 10:59 PM
Accordion Control Mike Collins Microsoft ASP .NET 0 7th Mar 2008 01:37 AM
Can you use an Accordion control in a masterpage? =?Utf-8?B?TmF0ZQ==?= Microsoft ASP .NET 3 13th Sep 2007 03:36 PM
ajax accordion control =?Utf-8?B?R2VyaGFyZA==?= Microsoft Dot NET 4 21st Jun 2007 03:20 PM
Databind to Accordion Control biggerandbetterkahler@googlemail.com Microsoft ASP .NET 0 13th Nov 2006 09:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:57 PM.