Käynnissä

International Site Javascript Cookie

On my site [url removed, login to view] it goes to a main landing page.

I want it to be similar to [url removed, login to view]

when you go to the site, you can pick you country, and check the box that says remember my location

the next time you come to the site it will go to the country site you originally selected

I basically need a javascript redirection cookie with a check box.

This is a very simple program. Just need a modification done to the code below

<!-- TWO STEPS TO INSTALL COOKIE REDIRECT:

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Ronnie T. Moore -->
<!-- Web Site: The JavaScript Source -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var expDays = 30;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

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" : "");
}
function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var favorite = GetCookie('animal');

if (favorite != null) {
switch (favorite) {
case 'cat' : url = 'cat.html'; // change these!
break;
case 'dog' : url = 'dog.html';
break;
case 'gerbil' : url = 'gerbil.html';
break;
case 'gopher' : url = 'gopher.html';
break;
}
window.location.href = url;
}
// End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<center>
<form>
<table><tr><td>
Please choose your Favorite Pet:<br>
<input type=checkbox name="cat" onClick="SetCookie('animal', this.name, exp);">Cat<br>
<input type=checkbox name="dog" onClick="SetCookie('animal', this.name, exp);">Dog<br>
<input type=checkbox name="gerbil" onClick="SetCookie('animal', this.name, exp);">Gerbil<br>
<input type=checkbox name="gopher" onClick="SetCookie('animal', this.name, exp);">Gopher<br>
</td></tr>
</table>
</form>
</center>

<p><center>
<font face="arial, helvetica" SIZE="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

This is a $15 dollar job and takes less than an hour for someone with java script experience.

Taidot: Javascript

Näytä lisää: site you, javascript go to, go javascript, international site javascript, landing page javascript, cookie, site box, site javascript, originally, javascript redirection, redirection javascript, Landing site, remember javascript, landing javascript, javascript remember, check dhl, javascript landing page, time javascript, pick site, javascript selected, javascript page page, javascript page, javascript check, razo30, time site redirection

Tietoa työnantajasta:
( 11 arvostelua ) Cerritos, United States

Projektin tunnus: #491385

Myönnetty käyttäjälle:

distantcoder

I am willing to do it in your budget. Kindly provide a nice feedback :-) DC

30 $ USD 1 päivässä
(1 arvostelu)
1.0

5 freelanceria on tarjonnut keskimäärin 47 $ tähän työhön

Rautella

lets get it done. Awaiting for my selection. Kind Regards, Rautella

115 $ USD 1 päivässä
(45 arvostelua)
5.2
fogtower

I have already finished your job. It's very easy. I can give code to you right now.

30 $ USD 1 päivässä
(9 arvostelua)
3.6
UOMADS

I'm interested in your project. Please refer to PM for details.

30 $ USD 0 päivässä
(4 arvostelua)
3.3
Pocha

Hi, I have prior experience handling cookie in javascript. Please check PM for details. Ashish

30 $ USD 1 päivässä
(3 arvostelua)
2.9