Team:Warsaw/Templates/2014Page
From 2014.igem.org
(Difference between revisions)
Line 198: | Line 198: | ||
<script> | <script> | ||
+ | function setCookie(cname, cvalue, exdays) { | ||
+ | var d = new Date(); | ||
+ | d.setTime(d.getTime() + (exdays*24*60*60*1000)); | ||
+ | var expires = "expires="+d.toUTCString(); | ||
+ | document.cookie = cname + "=" + cvalue + "; " + expires; | ||
+ | } | ||
+ | |||
function getCookie(cname) { | function getCookie(cname) { | ||
var name = cname + "="; | var name = cname + "="; | ||
Line 229: | Line 236: | ||
function changeAndGo(lang) { | function changeAndGo(lang) { | ||
- | + | setCookie('lang', lang, 1); | |
applyLanguage(); | applyLanguage(); | ||
location.href='https://2014.igem.org/Team:Warsaw'; | location.href='https://2014.igem.org/Team:Warsaw'; |
Revision as of 05:54, 13 October 2014