mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-16 00:05:53 +01:00
d11111aa41
ADDED demo for cookies utilization REFACTORED some samples
32 lines
984 B
HTML
32 lines
984 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<header>
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
|
<style>
|
|
body {
|
|
padding: 20px 50px 20px 50px;
|
|
}
|
|
</style>
|
|
<script>
|
|
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 onWindowLoad(){
|
|
document.getElementById('lastresponsefromcookie').innerHTML = 'Last Response: ' + decodeURIComponent(getCookie('lastresponse'));
|
|
}
|
|
</script>
|
|
</header>
|
|
<body onload="onWindowLoad()">
|
|
<h1>Server Side Views Primer <small>DMVCFramework</small></h1>
|
|
<div id="main" class="container"> |