Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~5K People Reached
Favorite Forums
Favorite Tags
Member Avatar for luckyuser

I have the cookies and subdomain selection for header: <script type="text/javascript" src="/static/js/jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(function(){ var city = readCookie('city'); if(city !=null && city !=''){ window.location.href = 'http://' + city + '.example.com'; } $('#citygo').change(function(){ var city = $(this).val(); window.location.href = 'http://' + city + '.example.com'; }); }); function createCookie(name,value,days) { if …

Member Avatar for luckyuser
0
2K
Member Avatar for luckyuser

I'm not exactly sure what the problem is but the cookies aren't available for subdomains. Is there any way around this, or is there a better way to set the cookies domain? Thanks! <?php ini_set("session.cookie_domain", ".example.com"); // Set cookie and redirect when user change city if( isset($_POST['city']) && $_POST['city'] != …

Member Avatar for diafol
0
2K
Member Avatar for luckyuser

I would like to replace ".city1{background:red;}" with ".city1 with http://city1.example.com" so that when user selects a city1 the page goes to the city1 url page. Since I don't need the color box with a message, can I remove the code: var cityChosen = getCookie('citychosen'); if(cityChosen!=null && cityChosen!=''){ var chosen = …

Member Avatar for diafol
0
520
Member Avatar for luckyuser

The cookie is not holding and the domain example.com cannot redirect to a.example.com when I type on the address bar. Anyone good at cookies? Any help will be very much appreciated. $(function(){ var city = getCookie('city'); if(city !=null && city !=''){ window.location.href = 'http://' + city + '.example.com'; } $('#citygo').change(function(){ …

Member Avatar for diafol
0
325