Jquery Cookies - States Of Sliding Panel Doesn't Work

Jan 5, 2011

I have a little problem with my sliding panels, I have a Page with 2 sliding panels (right and left). These panels have a 'slide button' and you can reduce panels by clicking on it. I use cookies to record state of panel, so when you change page panels stay collapsed or extended. But it doesn't work very well, in fact the state is recorded for the page. If I change page, panel will extend (default position) but if I go back on the page it will disapear. Is it possible to ignore the path in the cookie and use a cookie for all website?
Jquery code :

$('#rightfold').click(function () {
if ($('.menudroite').is(':visible')) {
$('.menudroite').hide("slide", { direction: "right" }, 400);
$.cookie('rightfold', 'collapsed');
$('.triggerdroite').animate({ backgroundColor: "#B2C9D1" }, 1000);
$('#rightfold').animate({ color: "#000000" }, 1000);
}
else {
$('.menudroite').show("slide", { direction: "right" }, 400);
$.cookie('rightfold', 'extended');
$('.triggerdroite').animate({ backgroundColor: "#6c7a7f" }, 1000);
$('#rightfold').animate({ color: "#d9f4ff" }, 1000);
}
});
$('#leftfold').click(function () {
if ($('.menugauche').is(':visible')) {
$('.menugauche').hide("slide", { direction: "left" }, 400);
$.cookie('leftfold', 'collapsed');
$('.triggergauche').animate({ backgroundColor: "#B2C9D1" }, 1000);
$('#leftfold').animate({ color: "#000000" }, 1000);
}
else {
$('.menugauche').show("slide", { direction: "left" }, 400);
$.cookie('leftfold', 'extended');
$('.triggergauche').animate({ backgroundColor: "#6c7a7f" }, 1000);
$('#leftfold').animate({ color: "#d9f4ff" }, 1000);
}
});
// COOKIES
var leftfold = $.cookie('leftfold');
var rightfold = $.cookie('rightfold');
// Set the user's selection for the left column
if (leftfold == 'collapsed') {
$('.menugauche').css("display", "none");
};
// Set the user's selection for the right column
if (rightfold == 'collapsed') {
$('.menudroite').css("display", "none");
};

View 2 Replies


Similar Messages:

AJAX :: User Control With JQuery Doesn't Work Inside Update Panel?

Sep 21, 2010

I created a .NET user control to work as a DropdownCheckbox and added Jquery to give the sliding and hide effects. The code is as below:

[Code]....

This control works fine in a normal page, but once I put it inside an update panel it doesn't work. Is there a work around or simply I can't use JQuery inside update panel?

View 1 Replies

Cookies Login Doesn't Work

Mar 24, 2011

I have a problem. I have done custom "Remember Me" functionality using cookies.

[code]....

I see the cookie in firecookies tools in the Firefox. It exists and has the correct expiration date.

But when I changed time - moved to next month. After that I entered to the site and I unlogged user.

View 1 Replies

Cookies - How To Manage States Of A Web Games

Nov 3, 2010

Say I need to develop a online cheese games and the game is just between computer and a real human player.

The req is to keep states (like steps,win history) usable even after the user closing browsers or server temp being offline in short time. Thus when the player goes back to the game page, he should be keep playing from what he played last time, and get his play history as well.

It is definitely need cookie to enable all this, but i m concerning about the security of using that. I should prevent ppl hacking the cookie directly to change the history or sth. My thought is to make the server end assign a token to client. All the steps and history data are associated with this token string and stored in a persistent layer (database).

Is it a overdesign , or there is a way to encrypt cookies.

View 3 Replies

State Management :: Cookies Doesn't Work - How To Solve Code

May 20, 2010

I try to use some cookies in my website.

But it isn't working right now.... , maybe becuase he doensn't run at a domain and locally like:

[URL}

But i like to be sure about this, and is my code ok?

The first one i run it , he runs the code between the if statemant.

The second one he has a cookie so he doesn't run the code between the if, but, the value of the coockie is null ?

View 6 Replies

Sliding Panel In A Table?

Aug 12, 2010

I want to display in my web page couple of show times and the list of movies under it.The display would be like this -

Show Time 6.30 PM

Movie 1
Movie 2
Movie 3

Show Time 9.30 PM

Movie 1
Movie 2
Movie 3

I want to display it in such a way that when I Click on "Show Time 6.30 PM" it would display the movies under that show and wont display anything under "Show Time 9.30 PM". Now when I click on "Show Time 9.30 PM", all the contents inside "Show Time 6.30 PM" should shrink and the list of movies should be available in "Show Time 9.30 PM".I need some idea on how to do this, will it be achieved using a sliding panel, or is there any other control.Note - For the show times and movie details I have a collection which I am binding it to a repaeter control.

What I am looking is for a SINGLE sliding panel which floats around every row in the table, So if Row 1 is clicked the panel displays the show times under it, when Row 2 is clicked, the data inside row 1 Is shrinked and the panel floats to down displaying the movies under Row 2.

View 2 Replies

Web Forms :: Focus Doesn't Work On Control In The Panel

Jan 21, 2010

In a panel (panelOrder, visible=false), there are three text box, txtA, txtB and txtC. Once click a button, code fires:

panelOrder.visible = true
txtA.focus

But, focus never work. I change to Javascript, still no luck. What is wrong?

View 5 Replies

Web Forms :: Implement Sliding Panel

Dec 3, 2012

i wish to show a slide panel on webpage.

View 1 Replies

AJAX :: Method Doesn't Work On Panel Inside UpdatePanel

Dec 10, 2010

I have problem to show method value on asp:Panel.

This is my *.aspx code :

[Code]....

Code Behind :

[Code]....

In this case, I can't show value myMethod at code behind to aspx file where this method is called.

If I use postBackTrigger in upControl updatePanel then the method(myMehod) will show on upShow updatePanel. But the updateProgress doesn't work.

View 3 Replies

AJAX :: AsyncFileUpload Javascript Doesn't Work Within Visible / Invisible Panel

Aug 18, 2010

I have an asyncfileupload control within a panel control. The panel is initially set to visible=false on page load. After a user clicks a button to display the panel contents however, I set the panel to visible and the user can then use the asyncfileupload. The problem however, is it seems much of the javascript associated with the asyncfileupload, does not function properly when the panel containing the upload control is set from invisible to visible. If I set my panel's "visible" property to "true" initially, then it works fine. My javascript error message is as follows:

"Form contains a file input, but is missing method=POST and enctype=multipart/form-data on the form. The file will not be sent."

Basically within my asyncfileupload control, I have the following line:

[Code]....

In this scenario, my "args" variable is always null (when I set my pane's "visible" property to "true" on page load, the args variable DOES contain data. Any idea why switching a panel from visible=false to visible=true, would cause an error like this?

View 2 Replies

Why Doesn't HTML Input Of Type File Work With Ajax Update Panel

Apr 29, 2010

I have a input of type file and when i try to do a Request.files when the input is wrapped in an update panel...it always returns an empty httpfilecollection. Why???

This is the codebehind: (At HttpContext.Current.Request.Files...its always 0 for the count.)

[code]....

View 1 Replies

JQuery Doesn't Work In A View Of Mvc Website

Jul 12, 2010

in a page of my asp.net mvc website jquery not worked. when i test the html source then i see the jquery script is not writtenonly one master page to load all jquery on every page .so where my jquery. when i debug my jquery then error found $ is not definedoff course it come because jquery not load

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.4.2");
google.load("jqueryui", "1.8.0");
</script>
<script language="javascript" type="text/javascript">
$(function () {
[code]...

View 3 Replies

Winforms - JQuery UI Datepicker / Doesn't Work

Sep 6, 2010

Given:

<input id="datepicker" type="text" />

Where the id = datepicker tells the javascript to attach all the datepicker code to the form element, how do I turn this into a server control?

For example:

<input runat="server" id="datepicker" type="text" />


Doesn't work because ASP.net generates it's own ID's.

Edit

<asp:TextBox runat="server" ID="dateTo" class="datepicker"></asp:TextBox>

Renders as

<input name="ctl00$mainContent$dateTo" type="text" id="ctl00_mainContent_dateTo" class="datepicker" />

And doesn't work!

View 3 Replies

Use Jquery For Sliding Effect?

May 21, 2010

I am new to javascript and jquery. I have written some javascript code for some client validation.

document.getElementById(spnError).style.display = 'block';

This is how I am showing a span if there is some validation issues in the form. I want to use Jquery to show this span. I would like to slide it down slowly.

View 2 Replies

JQuery UI Selectable Stop Event Doesn't Work In IE

Jun 22, 2010

I have a JQuery select component and a javascript function to handle the stop event:

[code]....

The script works fine in firefox and chrome but not in IE7/8. It is normally supposed to send a string to the openid_identifier textbox once the google or yahoo select box is clicked.

View 3 Replies

JQuery .Show() Doesn't Work With Server Control?

Nov 1, 2010

I have 2 html TR that i make them runat="server" & visible="false" and I have a dropdownlist called citiesDropDownList

$(document).ready(function() {
$('#<%=citiesDropDownList.ClientID %>').change(function() { ValidateCity(); });
});

and on change of this dropdownlist i check if the its text equal to a string i show the 2 tr as below

function ValidateCity() {
if ($('#<%= citiesDropDownList.ClientID %> :selected').text() == identity_CityOther) {
$('#<%= otherCityTR.ClientID %>').show();
$('#<%= areasTR.ClientID %>').show();
}
var city = $('#<%= citiesDropDownList.ClientID %>').val();
return IsValid((city.length != 0), '#<%= cityDiv.ClientID %>', identity_CityRequired);
}

.show() isn't work at all and i don't the reason .. can any lead me to get the problem?

FYI : I tried $('#<%= otherCityTR.ClientID %>').show('slow'); and also $('#<%= otherCityTR.ClientID %>').css('visibility', 'visible'); but it doesn't work also.

View 3 Replies

JQuery :: Datepicker Doesn't Work On Web User Control?

Feb 15, 2011

I have user control with one textbox on it and i want to apply datepicker to.

here is the code of mycontrol.ascx

[Code]....

If I click inside text box control the datepicker doesent shows.

If I use the same code for showing datepicker on webform it works. Why? Do I miss something or I need something to add on my control?

View 2 Replies

C# - Calling A Jquery Function From Code Behind Doesn't Work

Jul 2, 2010

I am calling a jquery function after inserting a record to database...

[code]....

But it doesn't seem to work...

View 4 Replies

Binding Doesn't Work Inside A JQuery Callback?

Jan 10, 2011

I have the following code:

<input type="text" ID="JOB_CODETextBox" runat="server" value='<%# Eval("JOB_CODE") %>' readonly="readonly"
onclick="$('#basic-modal-content').modal(
{
appendTo:'form', persist: true,
onClose: function (dialog)
{
document.findElementById('<%= JOB_CODETextBox.ClientID %>').value = 'value';
$.modal.close();
}
} );" />

The problem is, the binding '<%= JOB_CODETextBox.ClientID %>' doesn't work, it returns the same binding expression after renderign instead of replace it with the actual client id!

View 1 Replies

JQuery :: Button Inside Modal Popup Doesn't Work

Jun 3, 2010

I have a small problem, I have a page which 4 jQuery modal popups. everything works fine, all the popup comes up however when i click on the button inside the jQuery popup nothing happens. I cannot figure out why.

This is the jQuery code i used [URL]:-

[Code]....

View 2 Replies

Image Is Not Set To Imagecontrol And Jquery Plugin Doesn´t Work On Second Page_Load

Feb 13, 2011

When Page_Load is running the first time, I set Image 1.jpg to the HTML control with sucess!When Page_Load is running the second time, the Image 2.jpg is Not set to the same HTML control?This even that it should though I use a MessageBox to se that the C# code is running that should set 2.jpg to the control

View 2 Replies

JQuery :: Removing Tr From Table - Striping Doesn't Work Properly

Feb 28, 2011

I am drawing a grid using HTML and each tr element has it's own id. I want to be able to remove a tr on a button click, but not have to redraw the whole grid to show that the row has been deleted. I can do this using .hide(), but the problem is that I need to call a function to stripe my rows after, and since the row is still considered there, the striping doesn't work properly.

View 3 Replies

JQuery :: Ajax Call Doesn't Work After Adding Routes

Sep 16, 2010

I've added routes to my asp.net 4 website so that, for example the page: "~/Main/About/Careers.aspx" is mapped to the url: [URL] I'm using jquery to make an ajax call and it simply does not work after I've added the routing, I used the following code, and it remains stuck on the spinner image:

[Code]....

View 3 Replies

JQuery :: Relative Url On IE Doesn't Work - Generate Vertical Tabs Using Template

Feb 9, 2011

I'm trying to generate jquery vertical tabs using jquery template. I use this code :

[Code]....

Everything works greate on Firefox, Chrome, Opera and Safari but in IE this code doesn't work. When i looked on html source i saw that in IE instead on

[Code]....

I get

[Code]....

Because of this jqury vertical tabs doesn't work on IE.

View 2 Replies

Jquery Datepicker Not Focused After Date Is Chosen, After Postback Datepicker Doesn't Work

Jan 25, 2011

everytime the user selects a date from my datepicker the for some reason instead of staying focused on the are the date picker is in it scrolls to the top of the page.

Heres the function located at the bottom of my asp.net page under the

<script>
$(function() {
$( "#<%= pissued1.ClientID %>" ).datepicker();
});
</script>

This is the code.

<td align="left" colspan="2">
<strong>
<asp:Label ID="labdi1" runat="server" Text="*Date Issued:"></asp:Label>
<asp:RequiredFieldValidator ID="p1divalidate" runat="server" ControlToValidate="pissued1"
ErrorMessage="You Forgot The">*</asp:RequiredFieldValidator><br />
</strong>
<asp:TextBox ID="pissued1" runat="server" Width="45%"></asp:TextBox>
</td>

and also on postback my datepickers stop working. For example i have a dropdownlist that causes postback and if the user uses the drop downlist then the datepickers stop working

View 1 Replies







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