JSFiddle - React, Tailwind, and code Playground

by tchalvakspam

HTML

<link rel="stylesheet" href="http://www.shermanbrothers.com/sb/css/styles.css?date=29-4-3013">
<script src="http://www.shermanbrothers.com/js/shermanbrothers.js?date=29-4-2013"></script>
<body>
<div id='admin-header'>
    <div id='logo-container'>
    	<a href="/">
    		<img src="https://sb.local/assets/sb_logo.svg" alt='Shermanbrothers' title='View Main Site' width="150" height="58">
    	</a>
    </div>	
	<div id='header-content'>
		<div id='admin-nav'>
			<ul>
				<li class=''><a href='https://sb.local/sb/pos-order.php'>POSale</a>
				</li>
				<li>
					<form action="https://sb.local/sb/clientaccounts.php?" method="get" name="client-search">
					<input type="search" value="" name="search" placeholder=' Client' size=6 title='Search for a client by name, username, or email address'>
					</form>
				</li>
				<li class='current'><a href='https://sb.local/sb/orders/'>Orders</a></li>
				<li><form action='https://sb.local/sb/orders/orderview.php' method='get' title='Show Order by Order Id'>
					  <input type='search' name='OrderId' size=7 placeholder='OrderId' pattern='[0-9]{5,7}' title='Display an order by Order Id'>
					</form>
				</li>
				<li class=''><a href='https://sb.local/sb/items.php'>Items</a>
				</li>
				<li><form action='https://sb.local/sb/items.php' method='get' title='Search for Item'>
					  <input type='search' name='ItemNameSearch' size=5 placeholder=' Item' title='Search for a shoe by product code or item name'>
					</form>
				</li>
				<li class=''><a href='https://sb.local/sb/admin.php'>Admin</a>
				</li>
				<li class='last'><a class='iconified exit' href='https://sb.local/sb/salogout.php' title='Logout Roy Tchalvakspam' style='font-size:110%'><img src='https://sb.local/sb/assets/logoff_dark.png' alt='⟴'></a>
				</li>
			</ul>
		</div>
	</div>
</div>
<script src="orders.js"></script>
<script src="receivables.js"></script><!-- All just javascript functions -->
<script src="datepick.js"></script>
<script...

JavaScript

// A library of only functions, no procedural code excecuted.
function process_enter(payment_type, order_id) {
	//alert("message");
	if (document.getElementById('Save').disabled == true)
		alert("Oops! No order items were selected.");
	else {
		switch(payment_type) {
			case('AP'):	payment_ids = getCheckedValues('PaymentId[]');
						apply_only  = document.getElementById('ApplyOnly').checked ? "TRUE" : "FALSE";
						if (payment_ids=='')
							alert('Oops! Select a payment choice first.');
						else
							savePayment(payment_ids,apply_only);
						break;
			case('CC'):	if (document.getElementById('NewCCType').value				== '')
							alert('Oops! Select a Credit Card Type first.');
						else if (document.getElementById('NewCCNum').value			== ''		|| document.getElementById('NewCCNum').value		== 'Enter Credit Card Number')
							alert('Oops! Credit Card Number was blank.');
						else if (document.getElementById('NewCCExpMM').value		== ''		|| document.getElementById('NewCCExpMM').value		== 'Exp MM')
							alert('Oops! Credit Card Month Expiration was blank.');
						else if (document.getElementById('NewCCExpYY').value		== ''		|| document.getElementById('NewCCExpYY').value		== 'Exp YYYY')
							alert('Oops! Credit Card Year Expiration was blank.');
						else if (document.getElementById('NewCCName').value			== ''		|| document.getElementById('NewCCName').value		== 'Credit Card Holder Name')
							alert('Oops! Credit Card Holder Name was blank.');
						else if (document.getElementById('NewCCSecCode').value		== ''		|| document.getElementById('NewCCSecCode').value	== 'Security Code')
							alert('Oops! Credit Card Security Code was blank.');
						else if (document.getElementById('NewCCApplyAmt').value		<= '0.00'	|| document.getElementById('NewCCApplyAmt').value	== 'Apply Amount')
							alert('Oops! Credit Card Apply Amount was...