james13009
05-31-2012, 09:06 AM
Its been some while since I used javascript and even when I used to use it I was wasn't very good at it.
Can you tell me what is wrong with this script and how to get it working in firefox, there is more to the code but it manly these if statements repeating it self, I am think the code isn't valid or something.
function run() {
document.form1.RunnungT.value = "0"
var Total = 0;
document.all.testtext.innerHTML = "";
document.all.testtext.innerHTML = "<ul><b><u>Items Selected</u></b>";
if (document.form1.Thredbo.checked)
{
if (document.form1.J8.checked)
{
Total = Total + 469;
document.form1.RunnungT.value = Total;
document.all.testtext.innerHTML = document.all.testtext.innerHTML + "<li>Thredbo July 8th - 11th (Four days)</li>";
}
if (document.form1.J86.checked)
{
Total = Total + 669;
document.form1.RunnungT.value = Total;
document.all.testtext.innerHTML = document.all.testtext.innerHTML + "<li>Thredbo June 8th - 13th (Six days)</li>";
}
}
document.all.testtext.innerHTML = document.all.testtext.innerHTML + "</ul>";
}
</script>
Can you tell me what is wrong with this script and how to get it working in firefox, there is more to the code but it manly these if statements repeating it self, I am think the code isn't valid or something.
function run() {
document.form1.RunnungT.value = "0"
var Total = 0;
document.all.testtext.innerHTML = "";
document.all.testtext.innerHTML = "<ul><b><u>Items Selected</u></b>";
if (document.form1.Thredbo.checked)
{
if (document.form1.J8.checked)
{
Total = Total + 469;
document.form1.RunnungT.value = Total;
document.all.testtext.innerHTML = document.all.testtext.innerHTML + "<li>Thredbo July 8th - 11th (Four days)</li>";
}
if (document.form1.J86.checked)
{
Total = Total + 669;
document.form1.RunnungT.value = Total;
document.all.testtext.innerHTML = document.all.testtext.innerHTML + "<li>Thredbo June 8th - 13th (Six days)</li>";
}
}
document.all.testtext.innerHTML = document.all.testtext.innerHTML + "</ul>";
}
</script>