Ziomuś, ale to nie jest wytwórnia darmowych skryptów... masz tu prowizorke ;]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script LANGUAGE = JavaScript> <!-- Ukrycie przed przeglądarkami nieobsługującymi JavaScript
function obsluga_zdarzenia(obj, id, mSetValue){
if (isNaN (obj.value)){
document.getElementById(id).innerHTML = 'Blad';
obj.focus();
obj.select();
} else {
var mSV = document.getElementById(mSetValue).innerHTML;
document.getElementById(id).innerHTML = parseInt(mSV) * obj.value;
}
var a = document.getElementById('wynik1').innerHTML;
var b = document.getElementById('wynik2').innerHTML;
var c = document.getElementById('wynik3').innerHTML;
var d = document.getElementById('wynik4').innerHTML;
document.getElementById('all').innerHTML = parseInt(a) + parseInt(b) + parseInt(c) + parseInt(d);
}
// Koniec kodu JavaScript -->
<form action="self.php" method="post" >
<td id="setValue1">12,00
</td> <td><input type= "text" name="okno_tekstowe" value= "0" onChange="obsluga_zdarzenia(this, 'wynik1', 'setValue1')"></td>
<td id="setValue2">5,00
</td> <td><input type= "text" name="okno_tekstowe" value = "0" onChange="obsluga_zdarzenia(this, 'wynik2', 'setValue2')"></td>
<td id="setValue3">40,00
</td> <td><input type= "text" nam ="okno_tekstowe" value = "0" onChange="obsluga_zdarzenia(this, 'wynik3', 'setValue3')"></td>
<td id="setValue4">25,00
</td> <td><input type= "text" name="okno_tekstowe" value = "0" onChange="obsluga_zdarzenia(this, 'wynik4', 'setValue4')"></td>