TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
Advertisement
Associates
Associates
techtuts Darkmindz
CSS Tutorials Tutorialsphere.com - Free Online Tutorials
Boston PHP SurfnLearn
Reply
 
LinkBack (1) Thread Tools Display Modes
Old 12-14-2007, 01:44 PM   1 links from elsewhere to this Post. Click to view. #1 (permalink)
The Contributor
 
Join Date: Sep 2007
Posts: 89
Thanks: 1
Sam Granger is on a distinguished road
Default Cookie issue -jQuery

Hey guys! i'm using the jQuery cookie plugin.

My project had seo-friendly url's. Each module is in a seperate directory. I have a draggable menu, a cookie is make with the coordinates. Here's a snippet of the jQuery code:

Code:
<script type="text/javascript">
$().ready(function() {
	$('#sidebar').draggable({
		handle: 'div#logo',
		opacity: 0.8,
		zIndex: 50,
		stop: function() {
			var y = $('#sidebar').css('top');
			var x = $('#sidebar').css('left');
			jQuery.cookie('menu_position', x+','+y, 20, { expires: 7, path: '/', domain: 'intreli.com', secure: true });


		}
	});
	var pos = jQuery.cookie('menu_position').split(',');
	$('#sidebar').css({ position: 'absolute', top:pos[1], left:pos[0] });
});
</script>
I want the cookie to be made once and the same one to be read all over the domain, nomatter which directory/module you are viewing. However, each directory appears to have a seperate cookie. (each dir has a cookie with a path where that module is - something I dont want :()
Sam Granger is offline  
Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.talkphp.com/javascript-ajax-e4x/1736-cookie-issue-jquery.html
Posted By For Type Date
TalkPHP - Powered by vBulletin Post #1 Refback 12-29-2007 04:20 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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


All times are GMT. The time now is 01:18 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0