hey guys i have this invoice script im doing for my friend and it works until i add the auto suggest function that includes the jquery.js
why is it that when i combine different java scripts it cancel's out another?should i separate all my scripts in different pages and include them??
so basic
<html debug="true">
<head>
<title></title>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="jquery-calx-1.1.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#calx').calx({
autocalculate: false
});
$('#calculate').click(function(){
$('#calx').calx('update');
});
});
</script>
<style>
input[type="text"]{
width:100%;
}
td{
padding:5px 10px;
}
</style>
</head>
<body>
<form id="calx">
<table>
<thead>
<tr>
<td width="268" style="width:250px">Item Name</td>
<td width="162" style="width:80px">Price</td>
<td width="162" style="width:30px">Qty</td>
<td width="168" style="width:150px">Sub Total</td>
</tr>
</thead>
<tbody>
<tr>
<td><input id="item1" type="text" name="item[]" value=""/></td>
<td><input id="price1" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td>
<td><input id="qty1" type="text" name="qty[]" value="" data-format="0" /></td>
<td><input id="subtotal1" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price1*$qty1)" /></td>
</tr>
<tr>
<td><input id="item2" type="text" name="item[]" value="" /></td>
<td><input id="price2" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td>
<td><input id="qty2" type="text" name="qty[]" value="" data-format="0" /></td>
<td><input id="subtotal2" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price2*$qty2)" /></td>
</tr>
<tr>
<td><input id="item3" type="text" name="item[]" value="" /></td>
<td><input id="price3" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td>
<td><input id="qty3" type="text" name="qty[]" value="" data-format="0" /></td>
<td><input id="subtotal3" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price3*$qty3)" /></td>
</tr>
<tr>
<td><input id="item4" type="text" name="item[]" value="" /></td>
<td><input id="price4" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td>
<td><input id="qty4" type="text" name="qty[]" value="" data-format="0" /></td>
<td><input id="subtotal4" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price4*$qty4)" /></td>
</tr>
<tr>
<td><input id="item5" type="text" name="item[]" value="" /></td>
<td><input id="price5" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td>
<td><input id="qty5" type="text" name="qty[]" value="" data-format="0" /></td>
<td><input id="subtotal5" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price5*$qty5)" /></td>
</tr>
<tr>
<td height="39"> </td>
<td>Total Price : </td>
<td colspan="2"><input id="total" type="text" name="total" value="" data-format="$ 0,0[.]00" data-formula="($subtotal1+$subtotal2+$subtotal3+$subtotal4+$subtotal5)" /></td>
</tr>
<tr>
<td height="29"> </td>
<td>Tax1:</td>
<td colspan="2"><input id="totaltax1" type="text" name="totaltax" value="" data-format="$ 0,0[.]00" data-formula="($total+($total*5.00/100))" /></td>
</tr>
<tr>
<td height="29"> </td>
<td>Tax2:</td>
<td colspan="2"><input id="totaltax2" type="text" name="totaltax" value="" data-format="$ 0,0[.]00" data-formula="($total+($total*9.975/100))" /></td>
</tr>
<tr>
<td height="42"><input id="calculate" type="button" value="calculate" /></td>
<td>Tax in :</td>
<td colspan="2"><input id="totaltax" type="text" name="totaltax" value="" data-format="$ 0,0[.]00" data-formula="($total+($total*5.00/100+$total*9.975/100))" /></td>
</tr>
</tbody>
</table>
</form>
</body>
</html>