Goedenavond,
Javascript is voor mij erg niieuw heb me ingelezen en die cursus van W3 gevolgd,
desondanks vind ik het nog erg moeilijk.
Omdat ik net zoals velen graag redelijk vlot resultaat zie heb ik een bestaand script gebruikt en die aangepast.
Het gaat om een winkelwagen systeem (niet erg uitgebreid 19 producten) heb die pagina aangepast waarin je de onderdelen kunt aanklikken dan berekent hij een soort totaal als ik het .js bestand enigzins begrijp zou er dan een bestelpagina moeten verschijnen maar dat gebeurt niet, ik ben te groen in javascript om te begrijpen waar het zit!
Ik ben echt niet te beroerd om dingen uit te puzelen maar ik zie het echt niet!
hier een live voorbeeld http://www.prospray.nl/reken.html
hier de html code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>WINKELWAGENTJE MET OPTIES</title>
<script type="text/javascript" src="file:///C|/Users/roelie/wwmetopties/wwmetopties.js"></script>
</head>
<body>
<div align="center">
<form name="tel" method="get">
<input type=hidden name="prijs" value="12.00">
<input type=hidden name="prijs" value="16.00">
<input type=hidden name="prijs" value="14.00">
<input type=hidden name="prijs" value="18.00">
<input type=hidden name="prijs" value="20.00">
<input type=hidden name="prijs" value="25.00">
<input type=hidden name="prijs" value="30.00">
<input type=hidden name="prijs" value="35.00">
<input type=hidden name="prijs" value="40.00">
<input type=hidden name="prijs" value="50.00">
<input type=hidden name="prijs" value="12.00">
<input type=hidden name="prijs" value="5.00">
<input type=hidden name="prijs" value="0.00">
<input type=hidden name="prijs" value="65.00">
<input type=hidden name="prijs" value="30.00">
<input type=hidden name="prijs" value="25.00">
<input type=hidden name="prijs" value="45.00">
<input type=hidden name="prijs" value="0.65">
<input type=hidden name="prijs" value="7.00">
<div align="center">
<table border=1 width=400>
<tr>
<th>Product</th>
<th>Kies</th>
<th>Aantal</th>
<th>Eenheidsprijs</th>
</tr>
<tr>
<td>besteklade tot 45 cm breed</td>
<td><input type="checkbox" name="producten" value="besteklade tot 45 cm breed"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 12,00</td>
</tr>
<tr>
<td>besteklade tot 90 cm breed</td>
<td><input type="checkbox" name="producten" value="besteklade tot 90 cm breed"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 16,00</td>
</tr>
<tr>
<td>sierlijst en koof aantal meters</td>
<td><input type="checkbox" name="producten" value="sierlijst en koof aantal meters"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 14,00</td>
</tr>
<tr>
<td>kleine deuren tot 30 x 40</td>
<td><input type="checkbox" name="producten" value="kleine deuren tot 30 x 40"></td>
<<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 18,00</td>
</tr>
<tr>
<td>middenmaat deuren tot 50 x 60</td>
<td><input type="checkbox" name="producten" value="middenmaat deuren tot 50 x 60"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 20,00</td>
</tr>
<tr>
<td>grote deuren tot 60 x 70</td>
<td><input type="checkbox" name="producten" value="grote deuren tot 60 x 70"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 25,00</td>
</tr>
<tr>
<td>vaatwasserdeur</td>
<td><input type="checkbox" name="producten" value="vaatwasserdeur"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 30,00</td>
</tr>
<tr>
<td>koelkastedeur tot 60 x 90</td>
<td><input type="checkbox" name="producten" value="koelkastedeur tot 60 x 90"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 35,00</td>
</tr>
<tr>
<td>koelkastdeur tot 180 x 40</td>
<td><input type="checkbox" name="producten" value="koelkastdeur tot 180 x 40"></td>
<<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 40,00</td>
</tr>
<tr>
<td>grote objecten</td>
<td><input type="checkbox" name="producten" value="grote objecten"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 50,00</td>
</tr>
<tr>
<td>onderplint aantal meters</td>
<td><input type="checkbox" name="producten" value="onderplint aantal meters"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 12,00</td>
</tr>
<tr>
<td>folie verwijderen</td>
<td><input type="checkbox" name="producten" value="folie verwijderen"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 5,00</td>
</tr>
<tr>
<td>Vullen boorgaten/beschadigingen</td>
<td><input type="checkbox" name="producten" value="Vullen boorgaten/beschadigingen"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 0,00</td>
</tr>
<tr>
<td>massieve deur zijde</td>
<td><input type="checkbox" name="producten" value="massieve deur zijde"></td>
<<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 65,00</td>
</tr>
<tr>
<td>opdekdeur zijde</td>
<td><input type="checkbox" name="producten" value="opdekdeur zijde"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 30,00</td>
</tr>
<tr>
<td>radiator aantal meters</td>
<td><input type="checkbox" name="producten" value="radiator aantal meters"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 25,00</td>
</tr>
<tr>
<td>verpakken complete keuken</td>
<td><input type="checkbox" name="producten" value="verpakken complete keuken"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 45,00</td>
</tr>
<tr>
<td>bezorgen p/km vanaf hoogeveen</td>
<td><input type="checkbox" name="producten" value="bezorgen p/km vanaf hoogeveen"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 0,65</td>
</tr>
<tr>
<td>demonteren en monteren</td>
<td><input type="checkbox" name="producten" value="demonteren en monteren"></td>
<<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 7,00</td>
</tr>
</table>
</div>
<p align="center">
<input type="button" name="buttonName" value="Bestellen" onClick="BestelLijst()">
<input type="button" value="Alles Wissen" onClick="document.forms[0].reset();window.location.reload();"> </p>
</form>
</div>
</body>
</html>
en de js code
// winkelwagentje.js
// RESETTEN VAN DE VARIABELEN
var aantal=0;
var bedrag=0;
var subtotaal=0;
var totaal=0;
// OPMAKEN POPUP: HTML, HEAD, TITLE
function BestelLijst() {
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write("")
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01\/\/EN\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','html','>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','head','>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','title>',' ... EVEN GEDULD TOT DE FACTUUR IS OPGEMAAKT ... ','<','/title>','\n')
// SCRIPT VOOR CONTROLE OP GELDIG EMAIL-ADRES
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','script language=\"Javascript\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('function FControle','(formulier)',' {','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('if','(formulier.Emailadres.value.length <= 6 ||')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('formulier.Emailadres.value.indexOf (\'@\'\, 0) == -1 ||','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('formulier.Emailadres.value.indexOf (\'.\'\, 0) == -1')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('){','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('alert(\" Je hebt geen geldig e-mailadres ingevuld.\")','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('return false;','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('}','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('else {','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('alert (\"OK om te versturen? \")','\n')
// ***********************************************************************************
// * HOE WORDT HET FORMULIER VERSTUURD? INDIEN MET MAILTO: JOUW EMAIL-ADRES INVULLEN *
// ***********************************************************************************
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('formulier.action=\"mailto:dphaak@alice.nl\"','\n')
// ***************************************************************************************************
// * DE URL VAN DE BEDANKINGSPAGINA INVULLEN ("antwoord.htm" VERVANGEN DOOR DE NAAM VAN JOUW PAGINA) *
// ***************************************************************************************************
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('location.href=\"antwoord.htm"','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('return true;','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('}','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('}','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','/script>','<','/head>','\n')
// EINDE SCRIPT, EINDE HEAD, BEGIN BODY MET ACHTERGRONDKLEUR EN TEKSTKLEUR
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','body')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(' bgcolor=\"#FFFFFF\" text=\"black\">')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','div align=\"center\">','\n')
// BEGIN TABEL JOUW BESTELLING
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','table border=0 cellpadding=0 cellspacing=0 width=400>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=400 height=25 colspan=5 bgcolor=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"center\"><font face=\"Arial\" size=\"3\" color=\"white\"><b>JOUW BESTELLING<\/b>','<\/font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/td><\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','form name=\"formulier\" method=\"post\" enctype=\"text/plain\" onsubmit=\"JavaScript:return FControle(this);\">','\n')
// SCRIPT VOOR DE BEREKENING VAN PRODUCTEN EN PRIJZEN
// ******************************************************************************
// * 5 IS HET AANTAL PRODUCTEN: DIT GETAL AANPASSEN AAN JOUW AANTAL PRODUCTEN ! *
// ******************************************************************************
for (i=0;i<=19;i++){
if (document.tel.producten.checked){
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=300 colspan=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','input type=','\"','hidden','\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(' name=','\"',(i+1),'\"',' value=')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('\"',(document.tel.producten.value),'\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('>')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(document.tel.producten.value);
// REGEL TOEGEVOEGD VOOR DE WEERGAVE VAN DE OPTIES IN HET BESTELFORMULIER:
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(" ");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=70>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"right\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(document.tel.aantaly.value);
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(" stuk ");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(" = ");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=35>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"right\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(" € ");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<i','nput type=','\"','hidden','\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(' name=','\"','Aantal stuks','\"',' value=')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('\"',(document.tel.aantaly.value),'\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('>')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=50>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"right\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2>','\n')
aantal= (document.tel.aantaly.value);
bedrag= (document.tel.prijs.value);
subtotaal= aantal*bedrag;
totaal+=subtotaal ;
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(subtotaal.toFixed(2));
subtotaal=0 ;
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<br>');
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font><\/td>','\n')
}
else {}
// ***********************************************************************************
// * 4 IS HET AANTAL PRODUCTEN - 1 : DIT GETAL AANPASSEN AAN JOUW AANTAL PRODUCTEN ! *
// ***********************************************************************************
if (i==19) break ;}
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td colspan=5>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<br><font face=\"Arial\" size=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','input type=','\"','checkbox','\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(' name=','\"','Totaal bedrag','\"',' value=')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('\"',(totaal),'\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(' checked>')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write("<b>totaal: "+" ");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(totaal.toFixed(2));
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(" EURO<\/b>");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font><br><br>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/td><\/tr>','\n')
// BEGIN BESTELFORMULIER: NAAM, TELEFOON, EMAIL, ADRES
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=400 height=25 colspan=5 bgcolor=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"center\"><font face=\"Arial\" size=\"3\" color=\"white\"><b>BESTELFORMULIER<\/b>','<\/font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/td><\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td bgcolor=\"#CCCCCC\"><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=170 bgcolor=\"#CCCCCC\"><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=70 bgcolor=\"#CCCCCC\"><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=35 bgcolor=\"#CCCCCC\"><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td bgcolor=\"#CCCCCC\"><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=400 height=1 colspan=5 bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/td><\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=130 height=15 valign=\"middle\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\"><b> <\/b><\/font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\"> Naam: <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=370 height=15 valign=\"middle\" colspan=\"4\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','input type=\"text\" name=\"Naam besteller\" maxlength=\"20\"> <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=130 height=15 valign=\"middle\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\"> Telefoon: <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=370 height=15 valign=\"middle\" colspan=\"4\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=\"2\" color=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<i','nput type=\"text\" name=\"Telefoon\" maxlength=20 size=20><\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('</tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=130 height=15 valign=\"middle\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\"><b> <\/b><\/font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\">E-mail: <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=370 height=15 valign=\"middle\" colspan=\"4\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','input type=\"text\" name=\"Emailadres\" maxlength=\"25\" size=\"25\"><\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=130 valign=\"top\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\"><b> <\/b></\font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\">Adres: <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=370 valign=\"middle\" colspan=4 bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','textarea name=\"Besteladres\" rows=4 cols=40><\/textarea> <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
// AANMAKEN VERZENDKNOP
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=500 height=12 align=\"center\" valign=\"middle\" colspan=\"5\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"center\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','input type=\"submit\" name=\"Submit\" value=\"Versturen\"> <\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
// AFSLUITEN FORMULIER, TABEL, BODY, HTML
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','\/form>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','\/table><\/div>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','\/body>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','\/html>','\n')
}
Voor een ieder die de moeite heeft genomen er naar te kijken, hartelijk bedankt
met viendelijke groet,
Roelie
Javascript is voor mij erg niieuw heb me ingelezen en die cursus van W3 gevolgd,
desondanks vind ik het nog erg moeilijk.
Omdat ik net zoals velen graag redelijk vlot resultaat zie heb ik een bestaand script gebruikt en die aangepast.
Het gaat om een winkelwagen systeem (niet erg uitgebreid 19 producten) heb die pagina aangepast waarin je de onderdelen kunt aanklikken dan berekent hij een soort totaal als ik het .js bestand enigzins begrijp zou er dan een bestelpagina moeten verschijnen maar dat gebeurt niet, ik ben te groen in javascript om te begrijpen waar het zit!
Ik ben echt niet te beroerd om dingen uit te puzelen maar ik zie het echt niet!
hier een live voorbeeld http://www.prospray.nl/reken.html
hier de html code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>WINKELWAGENTJE MET OPTIES</title>
<script type="text/javascript" src="file:///C|/Users/roelie/wwmetopties/wwmetopties.js"></script>
</head>
<body>
<div align="center">
<form name="tel" method="get">
<input type=hidden name="prijs" value="12.00">
<input type=hidden name="prijs" value="16.00">
<input type=hidden name="prijs" value="14.00">
<input type=hidden name="prijs" value="18.00">
<input type=hidden name="prijs" value="20.00">
<input type=hidden name="prijs" value="25.00">
<input type=hidden name="prijs" value="30.00">
<input type=hidden name="prijs" value="35.00">
<input type=hidden name="prijs" value="40.00">
<input type=hidden name="prijs" value="50.00">
<input type=hidden name="prijs" value="12.00">
<input type=hidden name="prijs" value="5.00">
<input type=hidden name="prijs" value="0.00">
<input type=hidden name="prijs" value="65.00">
<input type=hidden name="prijs" value="30.00">
<input type=hidden name="prijs" value="25.00">
<input type=hidden name="prijs" value="45.00">
<input type=hidden name="prijs" value="0.65">
<input type=hidden name="prijs" value="7.00">
<div align="center">
<table border=1 width=400>
<tr>
<th>Product</th>
<th>Kies</th>
<th>Aantal</th>
<th>Eenheidsprijs</th>
</tr>
<tr>
<td>besteklade tot 45 cm breed</td>
<td><input type="checkbox" name="producten" value="besteklade tot 45 cm breed"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 12,00</td>
</tr>
<tr>
<td>besteklade tot 90 cm breed</td>
<td><input type="checkbox" name="producten" value="besteklade tot 90 cm breed"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 16,00</td>
</tr>
<tr>
<td>sierlijst en koof aantal meters</td>
<td><input type="checkbox" name="producten" value="sierlijst en koof aantal meters"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 14,00</td>
</tr>
<tr>
<td>kleine deuren tot 30 x 40</td>
<td><input type="checkbox" name="producten" value="kleine deuren tot 30 x 40"></td>
<<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 18,00</td>
</tr>
<tr>
<td>middenmaat deuren tot 50 x 60</td>
<td><input type="checkbox" name="producten" value="middenmaat deuren tot 50 x 60"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 20,00</td>
</tr>
<tr>
<td>grote deuren tot 60 x 70</td>
<td><input type="checkbox" name="producten" value="grote deuren tot 60 x 70"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 25,00</td>
</tr>
<tr>
<td>vaatwasserdeur</td>
<td><input type="checkbox" name="producten" value="vaatwasserdeur"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 30,00</td>
</tr>
<tr>
<td>koelkastedeur tot 60 x 90</td>
<td><input type="checkbox" name="producten" value="koelkastedeur tot 60 x 90"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 35,00</td>
</tr>
<tr>
<td>koelkastdeur tot 180 x 40</td>
<td><input type="checkbox" name="producten" value="koelkastdeur tot 180 x 40"></td>
<<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 40,00</td>
</tr>
<tr>
<td>grote objecten</td>
<td><input type="checkbox" name="producten" value="grote objecten"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 50,00</td>
</tr>
<tr>
<td>onderplint aantal meters</td>
<td><input type="checkbox" name="producten" value="onderplint aantal meters"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 12,00</td>
</tr>
<tr>
<td>folie verwijderen</td>
<td><input type="checkbox" name="producten" value="folie verwijderen"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 5,00</td>
</tr>
<tr>
<td>Vullen boorgaten/beschadigingen</td>
<td><input type="checkbox" name="producten" value="Vullen boorgaten/beschadigingen"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 0,00</td>
</tr>
<tr>
<td>massieve deur zijde</td>
<td><input type="checkbox" name="producten" value="massieve deur zijde"></td>
<<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 65,00</td>
</tr>
<tr>
<td>opdekdeur zijde</td>
<td><input type="checkbox" name="producten" value="opdekdeur zijde"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 30,00</td>
</tr>
<tr>
<td>radiator aantal meters</td>
<td><input type="checkbox" name="producten" value="radiator aantal meters"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 25,00</td>
</tr>
<tr>
<td>verpakken complete keuken</td>
<td><input type="checkbox" name="producten" value="verpakken complete keuken"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 45,00</td>
</tr>
<tr>
<td>bezorgen p/km vanaf hoogeveen</td>
<td><input type="checkbox" name="producten" value="bezorgen p/km vanaf hoogeveen"></td>
<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 0,65</td>
</tr>
<tr>
<td>demonteren en monteren</td>
<td><input type="checkbox" name="producten" value="demonteren en monteren"></td>
<<td><input type="text" name="aantaly" value="1" size=2></td>
<td height="24"><p align="center">€ 7,00</td>
</tr>
</table>
</div>
<p align="center">
<input type="button" name="buttonName" value="Bestellen" onClick="BestelLijst()">
<input type="button" value="Alles Wissen" onClick="document.forms[0].reset();window.location.reload();"> </p>
</form>
</div>
</body>
</html>
en de js code
// winkelwagentje.js
// RESETTEN VAN DE VARIABELEN
var aantal=0;
var bedrag=0;
var subtotaal=0;
var totaal=0;
// OPMAKEN POPUP: HTML, HEAD, TITLE
function BestelLijst() {
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write("")
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01\/\/EN\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','html','>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','head','>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','title>',' ... EVEN GEDULD TOT DE FACTUUR IS OPGEMAAKT ... ','<','/title>','\n')
// SCRIPT VOOR CONTROLE OP GELDIG EMAIL-ADRES
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','script language=\"Javascript\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('function FControle','(formulier)',' {','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('if','(formulier.Emailadres.value.length <= 6 ||')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('formulier.Emailadres.value.indexOf (\'@\'\, 0) == -1 ||','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('formulier.Emailadres.value.indexOf (\'.\'\, 0) == -1')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('){','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('alert(\" Je hebt geen geldig e-mailadres ingevuld.\")','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('return false;','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('}','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('else {','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('alert (\"OK om te versturen? \")','\n')
// ***********************************************************************************
// * HOE WORDT HET FORMULIER VERSTUURD? INDIEN MET MAILTO: JOUW EMAIL-ADRES INVULLEN *
// ***********************************************************************************
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('formulier.action=\"mailto:dphaak@alice.nl\"','\n')
// ***************************************************************************************************
// * DE URL VAN DE BEDANKINGSPAGINA INVULLEN ("antwoord.htm" VERVANGEN DOOR DE NAAM VAN JOUW PAGINA) *
// ***************************************************************************************************
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('location.href=\"antwoord.htm"','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('return true;','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('}','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('}','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','/script>','<','/head>','\n')
// EINDE SCRIPT, EINDE HEAD, BEGIN BODY MET ACHTERGRONDKLEUR EN TEKSTKLEUR
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','body')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(' bgcolor=\"#FFFFFF\" text=\"black\">')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','div align=\"center\">','\n')
// BEGIN TABEL JOUW BESTELLING
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','table border=0 cellpadding=0 cellspacing=0 width=400>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=400 height=25 colspan=5 bgcolor=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"center\"><font face=\"Arial\" size=\"3\" color=\"white\"><b>JOUW BESTELLING<\/b>','<\/font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/td><\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','form name=\"formulier\" method=\"post\" enctype=\"text/plain\" onsubmit=\"JavaScript:return FControle(this);\">','\n')
// SCRIPT VOOR DE BEREKENING VAN PRODUCTEN EN PRIJZEN
// ******************************************************************************
// * 5 IS HET AANTAL PRODUCTEN: DIT GETAL AANPASSEN AAN JOUW AANTAL PRODUCTEN ! *
// ******************************************************************************
for (i=0;i<=19;i++){
if (document.tel.producten.checked){
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=300 colspan=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','input type=','\"','hidden','\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(' name=','\"',(i+1),'\"',' value=')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('\"',(document.tel.producten.value),'\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('>')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(document.tel.producten.value);
// REGEL TOEGEVOEGD VOOR DE WEERGAVE VAN DE OPTIES IN HET BESTELFORMULIER:
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(" ");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=70>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"right\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(document.tel.aantaly.value);
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(" stuk ");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(" = ");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=35>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"right\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(" € ");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<i','nput type=','\"','hidden','\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(' name=','\"','Aantal stuks','\"',' value=')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('\"',(document.tel.aantaly.value),'\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('>')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=50>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"right\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2>','\n')
aantal= (document.tel.aantaly.value);
bedrag= (document.tel.prijs.value);
subtotaal= aantal*bedrag;
totaal+=subtotaal ;
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(subtotaal.toFixed(2));
subtotaal=0 ;
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<br>');
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font><\/td>','\n')
}
else {}
// ***********************************************************************************
// * 4 IS HET AANTAL PRODUCTEN - 1 : DIT GETAL AANPASSEN AAN JOUW AANTAL PRODUCTEN ! *
// ***********************************************************************************
if (i==19) break ;}
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td colspan=5>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<br><font face=\"Arial\" size=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','input type=','\"','checkbox','\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(' name=','\"','Totaal bedrag','\"',' value=')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('\"',(totaal),'\"')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(' checked>')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write("<b>totaal: "+" ");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(totaal.toFixed(2));
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write(" EURO<\/b>");
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/font><br><br>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/td><\/tr>','\n')
// BEGIN BESTELFORMULIER: NAAM, TELEFOON, EMAIL, ADRES
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=400 height=25 colspan=5 bgcolor=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"center\"><font face=\"Arial\" size=\"3\" color=\"white\"><b>BESTELFORMULIER<\/b>','<\/font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/td><\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td bgcolor=\"#CCCCCC\"><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=170 bgcolor=\"#CCCCCC\"><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=70 bgcolor=\"#CCCCCC\"><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=35 bgcolor=\"#CCCCCC\"><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td bgcolor=\"#CCCCCC\"><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=400 height=1 colspan=5 bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/td><\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=130 height=15 valign=\"middle\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\"><b> <\/b><\/font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\"> Naam: <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=370 height=15 valign=\"middle\" colspan=\"4\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','input type=\"text\" name=\"Naam besteller\" maxlength=\"20\"> <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=130 height=15 valign=\"middle\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\"> Telefoon: <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=370 height=15 valign=\"middle\" colspan=\"4\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=\"2\" color=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<i','nput type=\"text\" name=\"Telefoon\" maxlength=20 size=20><\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('</tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=130 height=15 valign=\"middle\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\"><b> <\/b><\/font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\">E-mail: <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=370 height=15 valign=\"middle\" colspan=\"4\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','input type=\"text\" name=\"Emailadres\" maxlength=\"25\" size=\"25\"><\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=130 valign=\"top\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\"><b> <\/b></\font>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"black\">Adres: <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=370 valign=\"middle\" colspan=4 bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"left\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<font face=\"Arial\" size=2 color=\"#999999\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','textarea name=\"Besteladres\" rows=4 cols=40><\/textarea> <\/font><\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
// AANMAKEN VERZENDKNOP
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<tr>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<td width=500 height=12 align=\"center\" valign=\"middle\" colspan=\"5\" bgcolor=\"#CCCCCC\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<p align=\"center\">','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','input type=\"submit\" name=\"Submit\" value=\"Versturen\"> <\/td>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<\/tr>','\n')
// AFSLUITEN FORMULIER, TABEL, BODY, HTML
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','\/form>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','\/table><\/div>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','\/body>','\n')
window.open("","win","left=10,top=10,width=450,height=525,scrollbars=yes,resizable=yes").document.write('<','\/html>','\n')
}
Voor een ieder die de moeite heeft genomen er naar te kijken, hartelijk bedankt
met viendelijke groet,
Roelie