fizmo 0 Newbie Poster

thanks to you both for the suggestions, it was oakleymk's that worked like a dream. Changed

if (document.all){ to  else{

and hey presto, everything working on all browsers.

Thank you so very much for your time and help

kate

fizmo 0 Newbie Poster

hiya, I'm very new to how javascript works and have inherited a website that contains a form that uses the calculate total function...which only works in IE. I've searched all over the net trying to find a solution to get this working across all browsers but not having much luck (mostly due to lack of experience), I'd really appreciate some help getting this sorted out...

This is the script for the calculate total function:

function calculate()
{
 value = 0;
 if (document.form.dvdle1b.checked==true) { value=value+0.5; }
 if (document.form.dvdle2b.checked==true) { value=value+0.5; }
 if (document.form.dvdle3b.checked==true) { value=value+0.5; }
 if (document.form.dvdle4b.checked==true) { value=value+0.5; }
 if (document.form.dvdle5b.checked==true) { value=value+0.5; }
 if (document.form.subscribe.checked==true) {value=value+1; } //subscription is 60 but the rest are 30
 if (document.form.dvd1.checked==true) { value=value+1; } //the current month dvd is 60 but the rest are 30
 if (document.form.dvd9.checked==true) { value=value+0.5; }
 if (document.form.dvd10.checked==true) { value=value+0.5; }
 if (document.form.dvd11.checked==true) { value=value+0.5; }
 if (document.form.dvd12.checked==true) { value=value+0.5; }
 if (document.form.dvd13.checked==true) { value=value+0.5; }
 if (document.form.dvd14.checked==true) { value=value+0.5; }
 if (document.form.dvd15.checked==true) { value=value+0.5; }
 if (document.form.dvd16.checked==true) { value=value+0.5; }
 if (document.form.dvd17.checked==true) { value=value+0.5; }
 if (document.form.dvd18.checked==true) { value=value+0.5; }
 if (document.form.dvd19.checked==true) { value=value+0.5; }
 if (document.form.dvd20.checked==true) { value=value+0.5; }
 if (document.form.dvdvisual1.checked==true) { value=value+0.5; }
 if (document.form.christmasdvd.checked==true) { value=value+0.5; }
 if (document.form.pridedvd.checked==true) { value=value+0.5; }

 if (document.layers)
 {
  if (document.form.cccountry[0].checked==true)
  {
   document.form.total.value = (value*60)*1.15;
  }
  if (document.form.cccountry[1].checked==true)
  {
   if (document.form.vat_number.value=='')
   {
    document.form.total.value = (value*60)*1.15;
   }
   else
   {
    document.form.total.value = (value*60);
   }
  }
 }
 if (document.all)
 {
  if (document.form.cccountry[0].checked==true)
  {
   temptotal = (value*60)*1.15;
   document.form.total.value = temptotal.toFixed(2); …