Skip to content

Instantly share code, notes, and snippets.

@fwarren
Last active July 13, 2017 17:14
Show Gist options
  • Save fwarren/b891611aac4f3577e13f26a3a7cb6a7c to your computer and use it in GitHub Desktop.
Save fwarren/b891611aac4f3577e13f26a3a7cb6a7c to your computer and use it in GitHub Desktop.
Fishbowl Inventory Client for ie6 mobile
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="jquery-1.12.4.min.js"></script>
<!--[if lt IE 9]>
<script src="html5shiv.min.js"></script>
<script src="respond.min.js"></script>
<![endif]-->
</head>
<body style="margin-top: 0px; margin-left: 4px; overflow-x: hidden; width="230px">
<form action="/action_page.php" style="margin-top: 0px;">
<table width="220px">
<tr>
<td><b>L:</b></td>
<td>
<select id="location" name="location" style="width: 180px;">
<option value="Main-A1">Main-A1</option>
<option value="Main-A2">Main-A2</option>
<option value="Main-A3">Main-A3</option>
<option value="Main-Receiving">Main-Receiving</option>
</select>
</td>
</tr>
<tr>
<td style="padding-top: 8px;">&nbsp;</td>
<td>
<div id="description"></div>
</td>
</tr>
<tr>
<td style="padding-top: 8px;"><b>P:</b></td>
<td>
<input id="part" type="text" name="part" value="">
</td>
</tr>
<tr>
<td style="padding-top: 8px;"><b>Q:</b></td>
<td>
<input id="qty" type="text" name="qty" value="" style="width: 40px;">
</td>
</tr>
<tr>
<td style="padding-top: 29px;">&nbsp;</td>
<td>
</form><input type="submit" value="Submit">
</td>
</tr>
<tr>
<td style="padding-top: 8x;" colspan="2" align="center">
<div id="message"></div>
</td>
</tr>
</table>
<script type="text/javascript">
$('#part').on('keypress', function (e) {
if(e.which === 13){
//Disable textbox to prevent multiple submit
$(this).attr("disabled", "disabled");
//Do Stuff, submit, etc..
$('#description').text('Part: ' + $('#part').val());
//Enable the textbox again if needed.
$(this).removeAttr("disabled");
if(spinner == null) {
spinner = new Spinner(opts).spin(spinner_div);
} else {
spinner.spin(spinner_div);
}
}
});
$('#qty').on('keypress', function (e) {
if(e.which === 13){
//Disable textbox to prevent multiple submit
$(this).attr("disabled", "disabled");
//Do Stuff, submit, etc..
$('#message').text('The Other Thing!!!');
//Enable the textbox again if needed.
$(this).removeAttr("disabled");
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment