I didnt code this javascript and i am having a hard time figuring out how to change this code for a field not to be editable and be static but still take the id field and do the calculation
you can view the site at as a demo at Demo
I want the Price field to be static right now its editble the code involved is using PHP Mysql and Javascript
I know i need to change the function but i dont know where, can anyone help me out here?
thanks
you can view the site at as a demo at Demo
I want the Price field to be static right now its editble the code involved is using PHP Mysql and Javascript
I know i need to change the function but i dont know where, can anyone help me out here?
thanks

Code:
<SCRIPT> function calc_subtotal(param) { var total=$("#price"+param).attr('value')*$("#quantity"+param).attr('value'); $("#total"+param).text(total.toFixed(2)+''); update_grandtotal(); } function update_grandtotal() { var total=0; var arr=$("div[@id^='total']"); for (var i=0;i<arr.length;++i) total+=parseFloat(arr[i].textContent); $("#grandtotal").text(total.toFixed(2)+''); } function savedata() { var arr=$("input[@id^='id']"); for (var i=0;i<arr.length;++i) { var param=arr[i].value; var id=parseInt(param); var price = parseFloat($("#price"+param).attr('value')); var quantity = parseInt($("#quantity"+param).attr('value')); var total = parseFloat($("#total"+param).text()); $.post("save.php", { id: id, quantity: quantity, price: price, total: total } ); } } setTimeout("update_grandtotal();", 500); </SCRIPT>
Comment