Search Results

Search found 1926 results on 78 pages for 'cookie monster'.

Page 7/78 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Pulling a value from one jQuery function into another

    - by Travis
    I'm trying to take the hex value chosen from a jQuery colorpicker plugin, and store it as a cookie using the jQuery cookie plugin. I just don't know the appropriate way to tie the two together (new to js and jQuery). Here's my colorpicker function: $('#colorSelector').ColorPicker({ color: '#ffffff', onShow: function (colpkr) { $(colpkr).fadeIn(500); return false; }, onHide: function (colpkr) { $(colpkr).fadeOut(500); return false; }, onChange: function (hsb, hex, rgb) { $('#colorSelector div, .preview-image, .cover ').css('backgroundColor', '#' + hex); $('body').css('backgroundColor', '#' + hex); $.cookie('bgColor', 'picker'); return false; } }); And here's my cookie function as is: var bgColor = $.cookie('bgColor'); if (bgColor == 'picker') { $('#colorSelector div, .preview-image, .cover ').css('backgroundColor', '#' + hex); }; I can set and store the cookie value as a standard css background-color, but can't figure out how to pull the "'backgroundColor', '#' + hex" value into the cookie function.

    Read the article

  • How to get same cookie to control two different folders on same site.

    - by Incandescent
    I am using the below cookie javascript to run a background color changer on my site. I want to also use it for the background color of my forum which is in a separate folder (http://lightbulbchoice.com/forum). I currently have it working on both the site and forum but you have to set each separately, i.e., each is setting it's own cookie. How do I get the forum to locate the main site cookie and not set it's own? // Cookie Functions - Second Helping (21-Jan-96) // Written by: Bill Dortch, hIdaho Design // The following functions were released to the public domain by him. function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } // --> </script>

    Read the article

  • Firefox will not remember local site cookie

    - by Campo
    This is a weird one. We have a production server (Server 2008) and two staging servers (Server 2008 and Server 2003) I have sites on all of these. They all use cookies. On the Production server when browsing to our site www.supernovainteractive.com there is a cookie that detects when you visted the site and it will not refresh the logo animation (top left hand side) on clicking to another page. This works for all browsers on the production server. I’m not sure what’s going on but for some reason cookies are not working on one site in the 2008 staging server only. This is when browsing using Firefox (3.6.3) they work fine on all other browsers (IE, Chrome, Safari, Opera) In addition, the 2003 staging server works fine. You can test on the Supernova Interactive site by noticing the logo in the top left corner. It uses a cookie to detect if you’ve already seen the animation. Once you’ve seen it once, it doesn’t animate again until tomorrow. Currently, it’s animating every time. I have opened an outside facing port so others can see the issue. Http://exchange.supernova.com:10009 Any ideas on this one? Firewalls are off on the server. Notice you do not get a cookie from Exchange.supernova.com.

    Read the article

  • Firefox Does NOT get local site cookie

    - by Campo
    This is a weird one. We have a production server (Server 2008) and two staging servers (Server 2008 and Server 2003) I have sites on all of these. They all use cookies. On the Production server when browsing to our site www.supernovainteractive.com there is a cookie that detects when you visted the site and it will not refresh the logo animation (top left hand side) on clicking to another page. This works for all browsers on the production server. I’m not sure what’s going on but for some reason cookies are not working on one site in the 2008 staging server only. This is when browsing using Firefox (3.6.3) they work fine on all other browsers (IE, Chrome, Safari, Opera) In addition, the 2003 staging server works fine. You can test on the Supernova Interactive site by noticing the logo in the top left corner. It uses a cookie to detect if you’ve already seen the animation. Once you’ve seen it once, it doesn’t animate again until tomorrow. Currently, it’s animating every time. I have opened an outside facing port so others can see the issue. Http://exchange.supernova.com:10009 Any ideas on this one? Firewalls are off on the server. Notice you do not get a cookie from Exchange.supernova.com.

    Read the article

  • SEO for images: can I use a different (cookieless) domain?

    - by Oliver
    Hello, We want to increase the value of some of our important images by means of SEO, and we want to start serving them from a different, i.e. cookieless, domain. We want to go from http://www.example.com/images/1234.jpg to http://www.example.com/germany/bavaria/landscape.jpg which can easily be done via URL rewriting. Then on the other hand, we would like to serve the image from a completely different domain, let's say http://www.examplestatic.com/germany/bavaria/landscape.jpg, to save the overhead of sending the cookie from www.example.com. Somehow I feel that this is not a good idea because I move the image away from the content by putting it on a different domain. Can anyone shed some light on this problem? Naturally, I would just use a different subdomain, e.g. img.example.com, but we already use subdomains for languages and our cookies are valid for all subdomains of example.com, so this won't help. I'd really appreciate any hints. Cheers,

    Read the article

  • Setting httponly in JSESSIONID cookie (Java EE 5)

    - by mythandros
    I'm trying to set the httponly flag on the JSESSIONID cookie. I'm working in Java EE 5, however, and can't use setHttpOnly(). First I tried to create my own JSESSIONID cookie from within the servlet's doPost() by using response.setHeader(). When that didn't work, I tried response.addHeader(). That didn't work either. Then, I learned that the servlet handled converting the session into a JSESSIONID cookie and inserting it into the http header so if I want to play with that cookie, I'll have to write a filter. I wrote a filter and played with setHeader()/addHeader() there, again to no avail. Then, I learned that there's some flush/close action going on in the response object before it gets to the filter so if I want to manipulate the data, I need to extend HttpServletResponseWrapper and pass that to filterChain.doFilter(). This is done but I'm still not getting results. Clearly I'm doing something wrong but I don't know what. I'm not sure if this is at all relevant to the question at hand but no html document is being returned by the servlet to the browser. All that's really happening is that some objects are being populated and returned to a JSP document. I've sort of assumed that The Session object is turned into a JSESSIONID cookie and wrapped -- along with the objects added to the request -- in an http header before being sent to the browser. I'd be happy to post some code but I want to rule out the possibility that my difficulties stem from a misunderstanding of the theory first.

    Read the article

  • F5 Load Balancer- ASPXAuth Cookie

    - by Emon
    Can somebody explain what ASPXAuth cookie does? My website uses forms auth and I am trying to create a load balancer (hardware) rule which will keep track of sessions based on the aspxauth cookie. Is it safe assume that the value of the cookie is unique? Thanks.

    Read the article

  • How to delete a large cookie that causes Apache to 400

    - by jakemcgraw
    I've come across an issue where a web application has managed to create a cookie on the client, which, when submitted by the client to Apache, causes Apache to return the following: HTTP/1.1 400 Bad Request Date: Mon, 08 Mar 2010 21:21:21 GMT Server: Apache/2.2.3 (Red Hat) Content-Length: 7274 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> Size of a request header field exceeds server limit.<br /> <pre> Cookie: ::: A REALLY LONG COOKIE ::: </pre> </p> <hr> <address>Apache/2.2.3 (Red Hat) Server at www.foobar.com Port 80</address> </body></html> After looking into the issue, it would appear that the web application has managed to create a really long cookie, over 7000 characters. Now, don't ask me how the web application was able to do this, I was under the impression browsers were supposed to prevent this from happening. I've managed to come up with a solution to prevent the cookies from growing out of control again. The issue I'm trying to tackle is how do I reset the large cookie on the client if every time the client tries to submit a request to Apache, Apache returns a 400 client error? I've tried using the ErrorDocument directive, but it appears that Apache bails on the request before reaching any custom error handling.

    Read the article

  • Problem with libcurl cookie engine

    - by Seb Rose
    [Cross-posted from lib-curl mailing list] I have a single threaded app (MSVC C++ 2005) build against a static LIBCURL 7.19.4 A test application connects to an in house server & performs a bespoke authentication process that includes posting a couple of forms, and when this succeeds creates a new resource (POST) and then updates the resource (PUT) using If-Match. I only use a single connection to libcurl (i.e. only one CURL*) The cookie engine is enabled from the start using curl_easy_setopt(CURLOPT_COOKIEFILE, "") The cookie cache is cleared at the end of the authentication process using curl_easy_setopt(CURLOPT_COOKIELIST, "SESS"). This is required by the authentication process. The next call, which completes a successful authentication, results in a couple of security cookies being returned from the server - they have no expiry date set. The server (and I) expect the security cookies to then be sent with all subsequent requests to the server. The problem is that sometimes they are sent and sometimes they aren't. I'm not a CURL expert, so I'm probably doing something wrong, but I can't figure out what. Running the test app in a loop results shows a random distribution of correct cookie handling. As a workaround I've disabled the cookie engine and am doing basic manual cookie handling. Like this it works as expected, but I'd prefer to use the library if possible. Does anyone have any ideas? Thanks Seb

    Read the article

  • PHP Retrieve Cookie which was not set with setcookie

    - by Martin
    I have the following problem - a third party software is setting a cookie with the login credentials and then forward the user to my app. I now need to retrieve the cookie values: The problem is - I can do this easily in the Frontend/AS3 with var ticket : String = CookieUtil.getCookie( 'ticket' ).toString(); but in PHP, the cookie is not within the $_COOKIES array. The cookie values are: Name: ticket Domain: .www.myserver.com Path : / Send for: encrypted connections only Expires: at end of session The one I see, and set before in PHP is: Name: myCookie Host: www.myserver.com Path : / Send for: any type of connection Expires: at end of session Actually, since host/domain are both the same, it should be visible in the PHP script, since it is running on this domain. Any thoughts? Thankx Martin

    Read the article

  • .NET Setting a cookie in a WebBrowser control

    - by ty
    I am loading a website using a WebBrowser's Navigate function, and I want the browser to load the page with a cookie I've given it. The following code doesn't work: wb.Navigate(url, null, null, "Cookie: " + cookie + "\n"); What am I doing wrong? Will I have to use InternetSetCookie? This doesn't seem like the best solution. Thanks!

    Read the article

  • Public ASPXAUTH cookie and security

    - by Bara
    Due to a bug in Flash, I have to use the ASPXAuth cookie to log a user in on a page that a flash upload script calls after upload. See this page for more information: http://geekswithblogs.net/apopovsky/archive/2009/05/06/working-around-flash-cookie-bug-in-asp.net-mvc.aspx I have to make the ASPXAUTH string "public" in the sense that it will be in the HTML of the page. My question is, how secure is this? I understand that anyone that can get to the string in the HTML can probably get to it from the cookie just as easily, but let's say someone does have this ASPXAUTH string. Is it possible that they can login as another user using this cookie? Would they be able to decrypt it? Bara

    Read the article

  • First Party and Third Party Cookie

    - by ajithperuva
    I want to create a analysis project (just like google analysis),for getting conversion rate and track visitor count.How can we create first party cookie and third party cookie using php.Actually, how can we identify our third party and first party cookie.Need to follow any type of standard for identify them?if anybody know please give me some idea about it...please

    Read the article

  • cookie name is truncated in Servlet 3.0 HttpServletRequest (Glassfish V3)

    - by idplmal
    I'm porting our Web authentication/authorization middleware for use in containers implementing the new servlet 3.0 API (Glassfish V3 in this case). The middleware pulls cookies from the HttpServletRequest filtering on cookies with names of the form "DACS:FEDERATION::JURISDICTION:username". This works fine in the version 2.5 servlet API but is broken in 3.0. The cookie names in 3.0 are being truncated at the first ":" in the name. I understand that the servlet 3.0 implementation defaults to RFC 2109 cookies which are more restrictive about cookie names than the old Netscape spec (":" is among the characters not allowed in RFC 2109 cookie names). Digging into the servlet 3.0 source code, it appears that the use of RFC2109 names can be disabled by setting a System property "org.glassfish.web.rfc2109.cookie_names_enforced" to false. I've tried this to no avail. But besides that, the code that uses checks cookie names is in the constructor for Cookie, and it would appear that the truncation is occurring elsewhere. So - finally - the question. Have others bumped into such issues in the servlet 3.0 API and have you found a work around?

    Read the article

  • jQuery Cookie Help

    - by Bruno
    Hi there.. So I have never attempted to use a cookie and was wondering if someone could possibly help me with some functionality I am trying to achieve.. Essentially I have a jQuery function that is fired when a user visits a webpage. What I would like to do is make it to where that animation only plays once.. Possibly leveraging some cookie that would tell it not to play again for x amount of days. I noticed that alot of people having questions about cookies and jQuery have been mentioned the following cookie plugin, but I dont even really know how to leverage it. Any ideas? Right now the animation is: $('#header, #footer, #secondary-column').fadeTo(600, 1); I would assume that if I could set a cookie to tell it the following: $('#header, #footer, #secondary-column').fadeTo(0, 1);

    Read the article

  • How to explicitly add a cookie in Watir?

    - by Sands
    I need to set a cookie in IE to execute some specific flow. I tried using the following code ieb = Watir::IE.new ieb.document.cookie="rememberme=foobar;Path=/; Domain=sometestdomain.com" # Bring up browser and do bunch of stuff However, I see that when the IE comes up, rememberme cookie is not set. Am I doing something wrong here?

    Read the article

  • Changing expiry on ASP.NET's Session State cookie

    - by Charlie Somerville
    I'm using ASP.NET Session State to keep track of logged in users on my site. However, one problem I'm running into is that by default ASP.NET session cookies are set to expire when the browser closes. I've tried setting my own ASP.NET_SessionId cookie and modifying the cookie's expiry using something similar to the following code: Response.Cookies["ASP.NET_SessionId"].Expires = DateTime.Now.AddMonths(1); None of these approaches work, they all set a second cookie with the same name. Is there a way of changing the session cookie's expiry?

    Read the article

  • JavaScript cookie value can't be retrieved in Django

    - by Boris Rusev
    I am trying to build a web site in both English and Bulgarian using the Django framework. My idea is the user should click on a button, the page will reload and the language will be changed. This is how I am trying to do it: In my html I hava a the button tag <button id='btn' onclick="changeLanguage();" type="button"> ... </button> An excerpt from cookies.js: function changeLanguage() { if (getCookie('language') == 'EN') { document.getElementById('btn').innerHTML = getCookie('language'); setCookie("language", 'BG'); } else { document.getElementById('btn').innerHTML = getCookie('language'); setCookie("language", 'EN'); } } function setCookie(sName, sValue, oExpires, sPath, sDomain, bSecure) { var sCookie = sName + "=" + encodeURIComponent(sValue); if (oExpires) { sCookie += "; expires=" + oExpires.toGMTString(); } if (sPath) { sCookie += "; path=" + sPath; } if (sDomain) { sCookie += "; domain=" + sDomain; } if (bSecure) { sCookie += "; secure"; } document.cookie = sCookie; } And in my views.py file this is the situation @base def index(request): if request.session['language'] == 'EN': return """<b>%s</b>""" % "Home" else request.session['language'] == 'BG': return """<b>%s</b>""" % "??????" So I know that my JS changes the value of the language cookie but I think Django doesn't get that. On the other hand when I set and get the cookie in my Python code again the cookie is set. My question is whether there is a way to make JS and Django work together - JavaScript sets the cookie value and Python only reads it when asked and takes adequate actions? Thank you.

    Read the article

  • Serialize problem with cookie

    - by cagin
    Hi there, I want use cookie in my web project. I must serialize my classes. Although my code can seralize an int or string value, it cant seralize my classes. This is my seralize and cookie code : public static bool f_SetCookie(string _sCookieName, object _oCookieValue, DateTime _dtimeExpirationDate) { bool retval = true; try { if (HttpContext.Current.Request[_sCookieName] != null) { HttpContext.Current.Request.Cookies.Remove(_sCookieName); } BinaryFormatter bf = new BinaryFormatter(); MemoryStream ms = new MemoryStream(); bf.Serialize(ms, _oCookieValue); byte[] bArr = ms.ToArray(); MemoryStream objStream = new MemoryStream(); DeflateStream objZS = new DeflateStream(objStream, CompressionMode.Compress); objZS.Write(bArr, 0, bArr.Length); objZS.Flush(); objZS.Close(); byte[] bytes = objStream.ToArray(); string sCookieVal = Convert.ToBase64String(bytes); HttpCookie cook = new HttpCookie(_sCookieName); cook.Value = sCookieVal; cook.Expires = _dtimeExpirationDate; HttpContext.Current.Response.Cookies.Add(cook); } catch { retval = false; } return retval; } And here is one of my classes: [Serializable] public class Tahlil { #region Props & Fields public string M_KlinikKodu{ get; set; } public DateTime M_AlinmaTarihi { get; set; } private List<Test> m_Tesler; public List<Test> M_Tesler { get { return m_Tesler; } set { m_Tesler = value; } } #endregion public Tahlil() {} Tahlil(DataRow _rwTahlil){} } I m calling my Set Cookie method: Tahlil t = new Tahlil(); t.M_AlinmaTarihi = DateTime.Now; t.M_KlinikKodu = "2"; t.M_Tesler = new List<Test>(); f_SetCookie("Tahlil", t, DateTime.Now.AddDays(1)); I cant see cookie in Cookie folder and Temporary Internet Files but if i will call method like that: f_SetCookie("TRY", 5, DateTime.Now.AddDays(1)); I can see cookie. What is the problem? I dont understand. Thank you for your helps.

    Read the article

  • Cookie parameter value problem

    - by cagin
    Hi there I want to use cookie in my project. But now i m using session. And i have some session parameters in .aspx pages.. for example: <SelectParameters> <asp:SessionParameter Name="refKlinik_id" SessionField="refKlinik_id" /> </SelectParameters> Now i want to use Cookie Paramter like that: <SelectParameters> <asp:CookieParameter Name="refKlinik_id" CookieName="refKlinik_id" </SelectParameters> but cookie's value is like that: sauidpU655614411262762102024i1600369917542431520431414503529630051999*CoreID683251601618012627621046&c but i need an integer value like 24. How can i convert cookie's value to int32 Thanks for your helps

    Read the article

  • Reading value of cookie using curl in php

    - by james
    Hello, Im using Firefox 3.5.9. When i visit a url , it sets a cookie on my computer.I can see this cookie in Firefox by going to Tools-Options-Privacy,then clicking on 'Remove Individual Cookies'. There is a folder called xyz,which contains a cookie named JSessionId and which has some Content value . If i use curl in my php code to navigate to that website,is there a way i can read the Content value of that cookie programmatically ? . Some sample code would be really appreciated. Thank You

    Read the article

  • JQuery cookie access has stopped working for GAE app

    - by Greg
    I have a google app engine app that has been running for some time, and some javascript code that checks for a login cookie has suddenly stopped working. As far as I can tell, NO code has changed. The relevant code uses the jquery cookies plugin (jquery.cookies.2.2.0.min.js)... // control the default screen depending // if someone is logged in if( $.cookies.get('dev_appserver_login') != null || $.cookies.get('ACSID') != null ) { alert("valid cookie!") $("#inventory-container").show(); } else { alert("INvalid cookie!") $("#welcome-container").show(); } The reason for the two checks is that in the GAE SDK, the cookies are named differently. The production system uses 'ACSID'. This if statement works in the SDK and now fails 100% of the time in production. I have verified that the cookie is, in fact, present when I inspect the page. Thoughts?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >