MAKE FREE JERSEY ONLINE
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Jersey maker</title>
<script type="text/javascript">
function rand_color() {
var hex = "0123456789ABCDEF";
var hexstr = "";
for (var i = 0; i < 6; i++) {
var tmp = Math.floor(Math.random() * 16);
if(!hex[tmp]) {
alert("unexpected random value: " + tmp);
tmp = 0;
}
hexstr += hex[tmp];
}
return "#"+hexstr;
}
function hack() {
clear('script-output');
var txt = $('name').value;
txt = trim(txt);
if(txt.length > 0 && txt != ' ') {
log('got <span class="val">\'' + txt + '\'<\/span> from the text field<br/>');
var tmp = "";
var i=0;
while(i<12) {
var fsize = String(i+14);
tmp = '<center class=e><p style="font-size:'+fsize+'pt; color: '+rand_color()+'">'+txt+'<\/p></center>';
add_html('script-output', tmp);
i++;
}
} else {
log('<span class="err">Error: got nothing from the text box...<\/span><br/>');
}
return false;
}
function livehack() {
/* un-comment the code below to update the page as you type
* to un-comment a block in Komodo, select the block and hit Ctrl+SHIFT+3
*/
//hack();
}
function hide(id) {
$(id).style.display = "none";
$('log-header').innerHTML = '<a href="JavaScript:show(\'log-div\')">Show Log<\/a>';
}
function show(id) {
$(id).className = ""; $(id).style.display = "block";
$('log-header').innerHTML = 'Log';
}
//]]>
</script>
<style type="text/css">
body {
color: #036;
/* fill in css declarations in here to test css autocomplete */
}
h1,h3 { font: 18pt bold sans-serif; color: #036; }
h3 { font-size: 14pt; }
a { color: #036; text-decoration: none; }
a:hover { text-decoration: underline; }
#form-items {
border: 1px solid #DEDEDE;
width: 550px;
}
#script-output {
height: 400px;
width: 590px;
}
#log {
overflow: scroll;
height: 150px;
width: 550px;
background-color: #000;
color: #EFEFEF;
font: 12pt bold monospace;
}
#script-output {
overflow: scroll;
border: 1px solid #DEDEDE;
}
#script-output p { margin: 0; padding: 0; }
.val { color: green; font-weight: bold; }
#name {
width: 160px;
border: 1px solid #3c3c3c;
background-color: #EFEFEF;
color: #036;
}
#ctrl { border-bottom: 1px solid #EFEFEF; }
.err { font: bold; color: red; }
#d{
width: 160px;
border: 1px solid #3c3c3c;
background-color: #EFEFEF;
}
</style>
</head>
<body>
<h1>Make now</h1>
<form id="test-form" onsubmit="return hack()">
<div id="form-items">
<label>Type some text:
<input type="text" id="name" value="GF name" onkeyup="livehack();"/>
</label>
<input type="submit" value="Click Me" id="sub-button" class="d"/>
</div>
<h3>Output:</h3>
<div id="script-output">
</div>
<h3 id="log-header">Log:</h3>
<div id="log-div">
<div id="ctrl"><a href="JavaScript:clear('log')">Clear</a>
<a href="JavaScript:hide('log-div')">Hide</a></div>
<div id="log"></div>
</div>
</form>
</body>
</html>
0 comments: