Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-31-2011, 10:59 PM   PM User | #1
alykins
Senior Coder

 
alykins's Avatar
 
Join Date: Apr 2011
Posts: 1,608
Thanks: 37
Thanked 183 Times in 182 Posts
alykins will become famous soon enough
AJAX toolkit Accordion cntrl

Hi All- I am trying to play around with the ajax toolkit accordion...
i referenced this simple demo but it does not work... i get a slew of errors...

Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="accordion.aspx.cs" Inherits="dragonfly.Web_Forms.accordion" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

 <style type="text/css">  
        .accordion {  
            width: 400px;  
        }  
          
        .accordionHeader {  
            border: 1px solid #2F4F4F;  
            color: white;  
            background-color: #2E4d7B;  
            font-family: Arial, Sans-Serif;  
            font-size: 12px;  
            font-weight: bold;  
            padding: 5px;  
            margin-top: 5px;  
            cursor: pointer;  
        }  
          
        .accordionHeaderSelected {  
            border: 1px solid #2F4F4F;  
            color: white;  
            background-color: #5078B3;  
            font-family: Arial, Sans-Serif;  
            font-size: 12px;  
            font-weight: bold;  
            padding: 5px;  
            margin-top: 5px;  
            cursor: pointer;  
        }  
          
        .accordionContent {  
            background-color: #D3DEEF;  
            border: 1px dashed #2F4F4F;  
            border-top: none;  
            padding: 5px;  
            padding-top: 10px;  
        }  
    </style>

</head>
<body>
    <form id="form1" runat="server">
    <div>

        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
    
        <asp:Accordion ID="Accordion1" 
           CssClass="accordion"  
           HeaderCssClass="accordionHeader"  
           HeaderSelectedCssClass="accordionHeaderSelected"  
           ContentCssClass="accordionContent"   
           runat="server">
          <Panes>
            <asp:AccordionPane runat="server">
                <Header>Home</Header>
                <Content>Emoh Emoh Emoh Emoh</Content>
            </asp:AccordionPane>

            <asp:AccordionPane runat="server">
                <Header>Services</Header>
                <Content>Secivres Secivres Secivres Secivres</Content>
            </asp:AccordionPane>

            <asp:AccordionPane runat="server">
                <Header>Contact</Header>
                <Content>Tcatnoc Tcatnoc Tcatnoc Tcatnoc</Content>
            </asp:AccordionPane>
          </Panes>
            <asp:AccordionExtender runat="server" Enabled="True" 
                TargetControlID="Accordion1" ID="Accordion1_AccordionExtender" 
                ContentCssClass="accordionContent" HeaderCssClass="accordionHeader" 
                HeaderSelectedCssClass="accordionHeaderSelected"></asp:AccordionExtender>
<asp:AccordionPane runat="server" HeaderCssClass="" ContentCssClass=""><Header>
Home
</Header>
<Content>
Emoh Emoh Emoh Emoh
</Content>
</asp:AccordionPane>
<asp:AccordionPane runat="server" HeaderCssClass="" ContentCssClass=""><Header>
Services
</Header>
<Content>
Secivres Secivres Secivres Secivres
</Content>
</asp:AccordionPane>
<asp:AccordionPane runat="server" HeaderCssClass="" ContentCssClass=""><Header>
Contact
</Header>
<Content>
Tcatnoc Tcatnoc Tcatnoc Tcatnoc
</Content>
</asp:AccordionPane>
        </asp:Accordion>
    


    </div>
    </form>
</body>
</html>
Also my end goal is to create a menu bar that when you are not hovering three menu bars (A,B,C) are all 100px wide... when you hover over one of them (let's say A) it will expand to 200px and the others will shrink to 50px... remove hover and they all go back to 100px... I want them to animate like an accordion... This is I assume a modification of an accordion menu?
__________________

I code C hash-tag .Net
Reference: W3C W3CWiki .Net Lib
Validate: html CSS
Debug: Chrome FireFox IE
alykins is offline   Reply With Quote
Old 06-01-2011, 12:05 AM   PM User | #2
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,452
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
wrong forum, ask in a .NET or at least a server-side forum...
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.8% IE9:11.4% IE10:6.5%
rnd me is offline   Reply With Quote
Old 06-01-2011, 12:13 AM   PM User | #3
alykins
Senior Coder

 
alykins's Avatar
 
Join Date: Apr 2011
Posts: 1,608
Thanks: 37
Thanked 183 Times in 182 Posts
alykins will become famous soon enough
It's an ajax client side hack... isnt it?
Moderator can you review and move if applicable please.
__________________

I code C hash-tag .Net
Reference: W3C W3CWiki .Net Lib
Validate: html CSS
Debug: Chrome FireFox IE
alykins is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


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

Forum Jump


All times are GMT +1. The time now is 07:43 AM.


Advertisement
Log in to turn off these ads.