Javascript - Accordion Not Working Properly

Mar 7, 2011

I have to show some functionality similar to accordion that is of jquery so i made a custom function of jquery to produce the effect. there is a grid view in which there are two div's here is the code.

<asp:GridView ID="grdAccordion" runat="server" AutoGenerateColumns="false" Width="200px">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<div class="myFirstDiv" onclick="testToggle(this)">
<%#Eval("Name")%>
<div class="mySecondDiv" style="display:none">
<%#Eval("Person_Name")%>
</div>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

The second div has style property display none. by default all the div are closed.
than i have made a js function that uses the toggle function to perform the action code.

function testToggle(testDiv) {
debugger
var sntHdnValue = $('#hdnSetFlag').val();
if (sntHdnValue == 1) {
$(testDiv).find('div:first').show().attr('isOpen', 'true');
}
else {
$(testDiv)
.parents('table:first')
.find('div[isOpen=true]').removeAttr('isOpen').toggle('slow');
$(testDiv).find('div:first').show().attr('isOpen', 'true');
}
sntHdnValue++;
$('#hdnSetFlag').val(sntHdnValue);
}

here i have made use of the hidden field that let's me know that it is the initial state every thing is closed i am adding a custom attr isopen for my identification

1)the current situation is this At load everty thing should be closed.
2)than at a time only single div should be open. this is working fine. The problem is if i click on the same div that i clicked to open than it has two custom attr isopen now it breaks the second case. how to solve it.

View 1 Replies


Similar Messages:

Javascript - Why ClientValidationFunction Function Is Not Working Properly

Jan 29, 2011

javascript - Why ClientValidationFunction function is not working properly

<script type="text/javascript">
function clientValidation(sender, arguments)
{
if (arguments.value == "hello world")
arguments.isvalid = true;
else
arguments.isvalid = false;
alert(arguments.isvalid);
}
</script>
<asp:Label ID="lblName" runat="server" Text="Enter Your Name" />
<asp:TextBox ID="txtbxName" runat="server" />
<asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="You are Not allowed" Display="None" ClientValidationFunction="clientValidation" ValidationGroup="ValidationSummary1" />
<br />
<asp:Label ID="lblClass" runat="server" Text="Class" />
<asp:TextBox ID="txtClass" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please enter Clas" ControlToValidate="txtClass" Display="None" ValidationGroup="ValidationSummary1" />
<br />
<asp:ValidationSummary ValidationGroup="ValidationSummary1" ID="ValidationSummary1" runat="server" />
<br />
<asp:Button ID="Button1" runat="server" Text="Validate" ValidationGroup="ValidationSummary1" />

View 1 Replies

Security :: Login Controls Not Working Properly On Textbox Modification In Javascript?

Jun 23, 2010

I am using membership management and role management. As login controls transfer data in plain text, I am encrypting userid/password in javascript and decrypting in serverside code.

Client side javascript:

[Code]....

If i am commenting these last two lines in javascript code.

[Code]....

View 2 Replies

AJAX :: Accordion Not Transitioning Properly?

Jun 30, 2010

I've added an accordion control to my page, but I have a problem when running it:When clicking on a new header to expand that pane, it immediately expands (i.e. doesn't "grow"), however the old pane collapses slowly (according to the TransitionDuration attribute). This causes a very dissatisfactory result as it looks very jumpy when opening new panes.I've had a good play around with all of the attributes and can't seem to fix it. Using IE 8 and VWD Express 2010 (though I had the same problem with 2008).

View 2 Replies

AJAX :: Accordion Not Displaying Properly In IE8?

May 11, 2010

I have an Accordion control with the following markup:

[Code]....

Here is how it displays...IE8:FireFox:As you can see, in IE it acts as if I've set the AutoSize to "Limit". I know there is this known issue with IE6 and IE7:The AutoSize "Limit" mode works exactly the same as the "Fill" mode for Internet Explorer 6 and 7 because they do not support the max-height CSS
property. Does this also extend to IE8? If not, what is the problem?

View 1 Replies

ADO.NET :: How To Get Working Properly In EF 4.0

Aug 26, 2010

I am trying to create an Abstract class that looks like the following (note that I coded it right inline here so it may not compile):

[Code]....

I want to (in my edmx design) be able to inherit from EntityBase and have each of those 6 columns be added to the physical database table representing the object that inherits it. So, for example, I have a class called Test that would look like this:

[Code]....

That Test class should have its physical data store mapping based on the other "stuff" plus the properties inherited from EntityBase. Thus, the database table for Test needs to also include those 6 columns from EntityBase. However, I'd like for it to be set up in a way so that they get mapped such that in the edmx design (what is that designer called anyway) when an entity inherits from the EntityBase, I don't need to do any further work to propogate those 6 columns over to the underlying database table. Am I making sense in how I am explaining this? how to accomplish this?

On a side note (and this can be answered separately or not at all) assuming this mapping is in place, NHibernate has a concept called an Interceptor. I'd like to add an "interceptor" to the delete function of any entity that is inherited from EntityBase so that it updates DeletedAt with the current time and DeletedBy with the current user and the same would be true for any updates with UpdatedAt/By. With NHibernate, you can test inside of this interceptor whether or not the object is of a certain type (e.g. object is EntityBase). Any ideas on how to get this with EF 4.0?

View 1 Replies

AJAX :: Accordion Is Not Working?

Mar 1, 2011

Accordion is not working?

View 1 Replies

CustomError Not Working Properly

Apr 20, 2010

I am using following setting for customError.

< customErrors mode="On" defaultRedirect="GenericErrorPage.aspx" >
< error statusCode="403" redirect="NoAccess.aspx" />
< error statusCode="404" redirect="FileNotFound.aspx" />
< /customErrors>

I have a folder "Admin" having access to administrators role. When someone other than administrators tries to access the pages inside admin folder, it is redirected to login page. My expectation is to display "NoAccess.aspx". Whats wrong with this code? Or is there other meaning to statusCode=403.

View 1 Replies

JQuery :: Use A Ui Accordion Control / Place An Accordion In An Accordion?

Nov 2, 2010

i am creating a menu which has the below structure. what i would like to do is use a jquery ui accordion control.

can i place an accordion in an accordion?... i.e. menu 1 expands out in an accordion and then the sub menus in menu 1 need to expand out in another accordion.

menu 1
sub menu of the menu 1
menu item
menu item
menu item
sub menu of the menu 1
sub menu of the menu 1
menu 2
sub menu of the menu 2
menu item
menu item
menu item
sub menu of the menu 2
sub menu of the menu 2

View 1 Replies

AJAX :: Repeater - Accordion Not Working

May 13, 2010

I have a repeater that contains an accordion. Inside the accordion, I have contents that consist of a <table> and text boxes, labels, buttons, the whole shooting match. When my code runs the contents all load no problem. The only problem is that my accordion is not working. There is no accordion function and all panes are expanded and I can't un expand them. Below is my source code.

[Code]....

View 2 Replies

VB.Net Data Report Not Working Properly

Feb 16, 2011

I have develoed a vb.net application for my client. I have been using datareport for that. The Data report get the output from the dataset file with the parameter. Now we need to show the value order by. For this i have added the order by in sql query which is generated by .xsd file. But still the output does like,...................

View 1 Replies

MVC :: Additional Route Not Working Properly

Feb 15, 2010

I have added a new route to Global.asax in order for me to create some nice seo friendly URLs for some news items I am displaying

routes.MapRoute(
"News",
// Route name
"{controller}/{action}/{id}/{title}",
// URL with parameters
new { controller =
"News", action =
"Story", id =
"", title =
"" }
// Parameter defaults );
routes.MapRoute{"Default",
// Route name
"{controller}/{action}/{id}",
// URL with parameters
new { controller =
"Home", action =
"Index", id =
"" }
// Parameter defaults );

The problem I have is that when I now hit my home page I am getting [URL] displayed in my URL rather [URL] which is what I used to get. I think the news route is picking up everything. Has anyone any ideas on what constraint I could put on the news route above so that it only ever processes requests from the news route. I was thinking of doing a reg ex on the title and excluding anything with the '-' character in it but I coud not get that to work

View 1 Replies

Accorian Menu Not Working Properly

Apr 18, 2010

I am using accordin menu in my site, placed in Master Page, It has 4 pane, each pane have multiple links. it was working fine previously. But suddenly it is displaying this error message There is no source code available for the current location.

It's is asking for show assembly. When I clicked on that I got a stopage at the stack

0000001a mov eax,dword ptr [ebp-0Ch]

I am really not sure what does it means. Also, there are several links in accordin menu, after clicking on anyone of the link I am not able to click the other link, might be because of the above reason.

View 1 Replies

RegularExpression Validation Not Working Properly

Jun 8, 2010

I am trying to use the ASP.NET regularexpressionvalidator to apply a password policy that enforces the following policy:

Password should include at least 6 characters, at least one small letter, at least one Capital letter, at least one number, and at least one special character. Here is the expression:

^.(?=.{6,})(?=.d)(?=.[a-z])(?=.[A-Z])(?=.[@#$%^&+=!-_()?]).*$

The strange thing I found is that it works fine except with the following scenario, If I use all the required combination without special character such as Hello123" it finds it as valid password. below is the controls used for testing.

View 3 Replies

Custom Control Not Working Properly

Jun 11, 2010

I have developed a ASP.Net Server custom control in C# for 3.5. named "myCheckBoxList" inherited from CheckBoxList web control. Working is very simple. It just works as a two option buttons. I have taken a CheckBoxList which will show two fixed checkboxes always. When I check one checkbox then another will uncheck as vise versa. This control works perfectly only when I have placed only one instance of that control on web page. If I place more than one instance of control then it doesnt works.

I need solution from expert minds from developers as stackoverflow users.

View 2 Replies

Website Not Working Properly In Mobile

Oct 18, 2010

I have created a simple app with a page having a server side form, three fields and a button that submits and performs two operations - 1) adds the form fields to the database table 2) sends an email. Now everything works fine on the web browser on my machine but when I access the app through my mobile, the page does not seem to work. the UI and all are set but the button click functionality doesnt seem to be working and also the label which is set after a successful submit is already visible and showing the "thank you" message. Am i doing something wrong here? I have checked the app on Nokia Smartphone browser, android phone, and iphone simulator.

View 2 Replies

Visual Studio ::IDE Not Working Properly

Jan 24, 2011

I have VS 2010. But IDE Not Working Properly like some times breakpoints are not applied, auto complete text is not showing etc.,

How can I get VS 2010 IDE right.

I have done Devenv /ResetSkipPkgs also...and resettes all the settings.

View 1 Replies

Table Sorter Is Not Working Properly?

Jan 21, 2011

I am using JQuery Table Sorter...Its working fine for all the fields except the year field in my grid view...Year Field is not sorted properly

This is my code:

$(function()
{
$("table[id$='gvInvoiceDetails']").tablesorter({ headers: { 4 : {sorter :
"currency"}},textExtraction:"complex", widgets: ['zebra']
}).tablesorterPager({container: $("#pager")});
});

View 1 Replies

RequiredFieldvalidator Is Not Working Properly In Modalpopup?

Dec 3, 2010

dear all, my requiredfieldvalidator is screwing up my ok button in my modalpopup and I dont know why. In otherwords, once I include my requiredfieldvalidator and the user clicks ok in the modalpopup, the ok doesnt get fired. see my code below.

[Code]....

View 6 Replies

Web Forms :: Panel Is Not Working Properly ?

Jul 1, 2010

i have written the foolwong code to show/hide the panels but it is not working properly can any one tell why..

private void button1_Click(object sender, EventArgs e)
{
panel1.Visible = true; [code]....

But only for first button it is working properly...

View 6 Replies

Security :: Logout Is Not Working Properly?

Feb 22, 2011

the web application was designed using asp.net 4.0/C# with form authentication .

logout is not working. After deleting web history, cookies, passwords, then also logout is not working.

My code is

[Code]....

View 2 Replies

AJAX :: Nested Accordion Control Not Working

Feb 22, 2010

Can anyone tell me why the following nested Accordion control does not work?

[Code]....

The error I kept getting is this:

DataSource 'sql1980s' for control 'acd1980s' doesn't exist Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: DataSource 'sql1980s' for control 'acd1980s' doesn't exist Source Error:

[Code]....

View 1 Replies

AJAX :: Accordion Panel Is Not Working On Page?

Feb 14, 2011

i write following code for accordion panel but its not open on page .....

<asp:Accordion ID="Accordion1" runat="server"
BorderColor="Black" RequireOpenedPane ="false" SelectedIndex ="-1"
HeaderCssClass="acco_header"
style="margin-left: 151px; top: 387px; left: 47px; position: absolute; height: 175px; margin-top: 0px;"
Width="322px" >
<Panes>
<asp:AccordionPane ID="AccordionPane1" runat="server" HeaderCssClass ="acco_header" ContentCssClass="acco_content" Width="100" Height="28" BorderColor="Black">
<Header>
Forgot Password
</Header>
<Content>
<h4>E-mail:</h4><asp:TextBox ID="text1" runat ="server" Width="150" Height="25"></asp:TextBox><br /><br />
<asp:Button ID="Button3" runat ="server" Text ="Submit" OnClick = "Button3_Click" BackColor="#FFDB70"/>
</Content>
</asp:AccordionPane>
</Panes>
</asp:Accordion>

View 1 Replies

AJAX :: Update Progress Is Not Working Properly?

Apr 22, 2010

I developed my application form in aspx page its such a huge form(6000 lines), I used update progress there for that updatepanel, But i cant able to see the update progress icon when i rendering the page.

[code]....

View 1 Replies

AJAX :: Tab Container Control Not Working Properly

Nov 10, 2010

i try to use ajax tab container control in my project, but it throws error. its not working properly

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved