Skip to content

Instantly share code, notes, and snippets.

@Synvox
Created June 14, 2012 02:07
Show Gist options
  • Save Synvox/2927700 to your computer and use it in GitHub Desktop.
Save Synvox/2927700 to your computer and use it in GitHub Desktop.
<html>
<head>
<style type="text/css">
</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;">
<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