Skip to content

Instantly share code, notes, and snippets.

@Synvox
Created June 14, 2012 02:49
Show Gist options
  • Save Synvox/2927791 to your computer and use it in GitHub Desktop.
Save Synvox/2927791 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>License</title>
<style type="text/css">
body {
text-align:center;
padding-top:25%;
background:#ddd;
font-family:"sans-serif";
}
input {
font-size:48px;
padding:16px;
border:1px #aaa solid;
}
#main {
margin:auto;
width:300px;
text-align:left;
color:#888;
}
</style>
</head>
<body>
<form id="end"
action="http://192.168.146.1/pos/firstpos/purch/srch_result.asp" method="post">
<input type="hidden" name="PAR_FNAME" id="fname"/>
<input type="hidden" name="PAR_LNAME" id="lname"/>
<input type="hidden" name="PHONE" id="lname"/>
</form>
<form onsubmit="superFunction();return false;" id="main">
Please Swipe a License:<br/>
<input type="text" id="card"/>
<input type="submit" value="Search" style="display:none"/>
</form>
<script type="text/javascript">
document.onkeydown=function(){
x('card').focus();
}
var x=document.getElementById;
function superFunction(){
var card=x("card").value;
var name=card.split("^")[1].split("$");
x("fname").value=name[1];
x("lname").value=name[0];
document.forms[0].submit();
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment