 |
korn |
SET FIRE!

Registered: Jun 2002
Posts: 5793 (0.69 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: 1°! ....fuori corso :(
Time Online: 37 Days, 5:56:42 [...]
Status: Offline
Edit | Report | IP: Logged |
Prova così...
code:
<script language="JavaScript">
<!--
function totale () {
var palbergo = 0;
if ( document.forms[0].hotel.value == "marina" )
palbergo = 460;
if ( document.forms[0].hotel.value == "western" )
palbergo = 432;
if ( document.forms[0].aggiungici.checked == true )
palbergo += 120;
document.forms[0].tot.value = palbergo;
}
//-->
</script>
e poi aggiungi negli <input> del check e dei radio
code: onClick="totale();"
E' fatto in fretta e furia, spero funzioni
Se non funziona, prova a sostituire forms[0] con il nome della form, e ricorda che JS è case-sensitive!
__________________
» Collect some stars to shine for you, and start today ‘cause there are only a few. _ (In Flames)
» Don't stop for nothing, it's full speed or nothing! I'm taking down, you know, whatever is in my way! _ ('tallica)
» I am my own god, I do as I please. _ (Pain)
» Ninetynine, ninetynine knives! Ninetynine knives inside! Nobody gets out alive! _ (The Haunted)
Web: http://www.negativesignal.com - ICQ# 171585477 - Death to software patents! And TCPA too! "e uno!", diceva il boia.
|