<!DOCTYPE html>
<html lang="en">
<head>
        <meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
        <title>Stateless Loop</title>
</head>
<style type="text/css">
div.centre {
width: 650px;
display: block;
margin-left: auto;
margin-right: auto;
}
form fieldset {
        margin: 0 0 20px 0;
        font-size: 14px;
}
form fieldset label {
        display: block;
        margin: 0 0 5px 0;
        font-weight: bold;
}
form fieldset textarea {
        display: block;
        width: 98%;
        padding: 5px;
        font-size: 14px;
        border: 1px solid #ddd;
        background: #f5f5f5;
        -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.05);
        -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.05);
        -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.05);
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
        border-radius: 4px;
}
form fieldset textarea {
        height: 150px;
}
form fieldset p.form-help {
        margin: 5px 0 0 0;
        font-size: 12px;
        color: #999;
}
form input[type="submit"] {
        float: right;
        margin: 0;
        padding: 5px 10px;
        font-size: 12px;        
        font-weight: bold;
        border: 1px solid #ccc;
        background: #eee;
        -webkit-border-radius: 4px;
        -moz-border-radius: 4px;
        border-radius: 4px;
}
form input[type="submit"]:hover,
form input[type="submit"]:focus {
        border: 1px solid #bbb;
        background: #e5e5e5;
}
form input[type="submit"]:active {
        border: 1px solid #ccc;
        background: #eee;
}                
</style>        
<body><div class="centre">
        <form method=post action="@|k-url|">
                <fieldset>
                        <label for="quote">@|msg|</label>
                        <textarea id="quote" name="quote"></textarea>
                        <input type="submit" value="Go" />
                </fieldset>
        </form>                
        <div id="the-output">@|output|</div>
</div></body></html>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
var selectElementText = function (el, win) {
win = win || window;
var doc = win.document, sel, range;
if (win.getSelection && doc.createRange) {
sel = win.getSelection();
range = doc.createRange();
range.selectNodeContents(el);
sel.removeAllRanges();
sel.addRange(range);
} else if (doc.body.createTextRange) {
range = doc.body.createTextRange();
range.moveToElementText(el);
range.select();
}
};
//highlite for Copy and Paste
$(function() {
selectElementText($("#the-output")[0]);
});
</script>