grazie mille

il motivo che la funzione era sbagliata è che non l'ho trascritta bene...



è giusto cosi?perche dovrei recuperare i due valori da due imput diversi
e poi avere un output nel terzo textbox, anche se poco fa ho letto un thread dove due dicevano che javascript non puo' immettere testo in un textbox.
codice:
function percentuale(px,malus) {
	var malus = document.getElementsByName('malus').value; //input text malus ;
             var px= document.getElementsByName('px').value; // input text px
	var npx = (malus / 100) * px;
	return npx;
}
il mio form è tipo:
codice:
<form name="pippo" action="topolinia.php" method="get">
<input type="text" name="px" id="topo">
<input type="text" name="malus" id="topo">
<input type="text" name="npx" id="topo">
<input type="submit" value="vai">
</form>
ma il form potrebbe anche non esistere....cioè vorei far si che in automatico apparisse il valore calcolato in base all'input px e all'input malus non appena tolgo il focus da malus.
e il valore npx mi compare a questo punto sull'input npx...e solo ora premo il tasto invia.

è possibile farlo?
grazie