Gegroet mensen :)
het onderstaande scriptje is enkel bruikbaar in Internet Explorer, weet iemand hoe dat komt. Als je bv. in FF bereken klikt is het totaal gewoon 0 euro...

script:

_______________________________________


<script language="JavaScript" type="text/javascript">
//<![CDATA[
<!--
function PrijsTotaal()
{


verM = new Array(2,150,100) 



stan = 0 



storeSubtext = new Array()
var sub = 0
var subsel = 0
var subtext = 0
var subsubtext = 0
var subbox = 0
var subrad = 0
var totaal= 0
var txtfieldcount = 0
var addstoresubs = 0
document.form1.totaal.value=0

         for (i=0;i<form1.length;i++)
   {
         var tempobj=form1.elements[i]
         if(tempobj.type=="select-one") {subsel=document.form1.elements[i].options[document.form1.elements[i].selectedIndex].value-0+subsel;}
else if(tempobj.type=="text") {subsubtext=document.form1.elements[i].value-0;storeSubtext[txtfieldcount] = subsubtext * verM[txtfieldcount];txtfieldcount++;}
else if((tempobj.type=="checkbox") && (document.form1.elements[i].checked == true)) {subbox=document.form1.elements[i].value-0+subbox;}
else if((tempobj.type=="radio") && (document.form1.elements[i].checked == true)) {subrad=document.form1.elements[i].value-0+subrad;}
}
for(s=0;s<storeSubtext.length-1;s++) {
addstoresubs = storeSubtext[s] + addstoresubs
subtext = addstoresubs
}
sub=subsel+subtext+subbox+subrad+stan;
document.form1.temp.value = sub
sub = fdp(document.form1.temp.value,  2);
totaal=sub;
document.form1.totaal.value=totaal;
}
function fdp(n,d){
  var xx = n.indexOf('.')
  var l = n.length
  var zstr = '0000000000000000000000'
  var theInt = ''
  var theFrac = ''
  var theNo = ''
  rfac = ''
  rfacx = 0
  nx = 0
  var xt = parseInt(d) + 1
  var rstr = '' + zstr.substring(1,xt)
  var rfac = '.' + rstr + '5'
  var rfacx = parseFloat(rfac)
  if (xx == -1 )  {    // No fraction
    theFrac = zstr
    theInt = "" + n
  }
  else if (xx == 0) {
    theInt = '0'
    nx = 0 + parseFloat(n) + parseFloat(rfacx)
    n = nx + zstr
    theFrac = '' + n.substring(1, n.length)
  }
  else {
    theInt = n.substring(0,xx)
    nx = parseFloat(n) + rfacx
    n = '' + nx + zstr
    theFrac = '' + n.substring(xx+1,xx + 1 + parseInt(d))
    var astr = 'd = ' + d
  }
  theFrac = theFrac.substring(0,parseInt(d))
  var ii = 0
  theNo = theInt + '.' + theFrac
  return theNo
}
//-->
//]]>
</script>
</head>
<body bgcolor="#A78C5C">

<form name="form1" id="form1" action="#">
<table border="0" width="100%" cellspacing="0" cellpadding="6" summary="">
<tr>
<td valign="top" align="left" width="100%" height="1"><font face="Comic Sans MS,Verdana">&#8226; De layout
moet...<br />
<br />
<select name="layout" size="1">
<option value="200">...eenvoudig zijn.</option>
<option value="350">...standaard zijn.</option>
<option value="440">...beter dan standaard zijn.</option>
</select></font><hr width="320" style="color: #000000;" align="left" /></td>
</tr>

<tr>
<td valign="top" align="left" width="3500" height="15"><font face="Comic Sans MS,Verdana">&#8226; De intro is een...<br />
<br />
<select name="intro" size="1">
<option value="10">...Normale intropagina.</option>
<option value="25">...Kleine flashintro.</option>
<option value="0">...identieke pagina aan de rest van mijn site.</option>
</select></font><hr width="320" style="color: #000000;" align="left" /></td>
</tr>
<tr>
<td valign="top" align="left" width="5000" height="15"><font face="Comic Sans MS,Verdana">&#8226; Hoeveel pagina's ongeveer? <br /><br /></font>
 <input type="text" size="5" maxlength="3" value="" /><font face="Comic Sans MS,Verdana"> Pagina's</font><hr width="320" style="color: #000000;" align="left" /></td>
</tr>

<tr><td valign="top" align="left" width="5980" height="7"><font face="Comic Sans MS,Verdana">&#8226; Ik wil ook een...
<br /></font></td>
</tr>
<tr>
<td valign="top" align="left" width="1920" height="1"><font face="Comic Sans MS,Verdana">-<input type=
"checkbox" name="mailformulier" value="5" />...mailformulier</font></td>
</tr>
<tr>
<td valign="top" align="left" width="1920" height="1"><font face="Comic Sans MS,Verdana">-<input type=
"checkbox" name="teller" value="0" />...bezoekers teller</font></td>
</tr>
<tr>
<td valign="top" align="left" width="1920" height="2"><font face="Comic Sans MS,Verdana">-<input type=
"checkbox" name="nieuws" value="5" />...nieuwssysteem</font></td>
</tr>
<tr>
<td valign="top" align="left" width="1920" height="21"><font face=
"Comic Sans MS,Verdana">-<input type="checkbox" name="forum" value=
"30" />...forum</font><hr width="320" style="color: #000000;" align="left" /></td>
</tr>

<tr>
<td valign="top" align="left" width="4500" height="20"><font face="Comic Sans MS,Verdana">
   <input type="hidden" name="temp" value="" /> <input type=
"button" value=" totaal " onclick=
"PrijsTotaal();" /> -&gt; <input type="text" size="7" value=""
name="totaal" /> Euro <font size="-1" face=
"Comic Sans MS,Verdana,Tahoma,Arial">(excl. BTW)</font></font><br />
<br /></td>
</tr>
</table>
</form>

</body>
</html>


_____________________________________

Groetjes,
Isupporter :)

(euh: ziet er maar raar uit...http://www.i-support.be/prijsbereken.php voor de broncode)

Reageren