Difference between revisions of "Team:Lethbridge HS"
Line 15: | Line 15: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
− | + | function setCookie(cname, cvalue, exdays) { | |
var d = new Date(); | var d = new Date(); | ||
d.setTime(d.getTime() + (exdays*24*60*60*1000)); | d.setTime(d.getTime() + (exdays*24*60*60*1000)); | ||
Line 21: | Line 21: | ||
document.cookie = cname + "=" + cvalue + "; " + expires; | document.cookie = cname + "=" + cvalue + "; " + expires; | ||
} | } | ||
+ | |||
+ | |||
+ | |||
+ | function getCookie(cname) { | ||
+ | var name = cname + "="; | ||
+ | var ca = document.cookie.split(';'); | ||
+ | for(var i=0; i<ca.length; i++) { | ||
+ | var c = ca[i]; | ||
+ | while (c.charAt(0)==' ') c = c.substring(1); | ||
+ | if (c.indexOf(name) == 0) return c.substring(name.length,c.length); | ||
+ | } | ||
+ | return ""; | ||
+ | } | ||
+ | |||
function functionBees(){ | function functionBees(){ |
Revision as of 23:30, 10 September 2015