Necrolite
Legacy Member
Heb een winkelkarretje aangepast, nu het origineel werkt,
dus bijvoorbeeld ik heb maar 1 winkelgoed geselecteert maar wil er 3 van maken, dus neem je 3 update order.
Als ikhet op mijn pagina doe, blijft hij op 1 staan
iemand een idee?
Origineel winkelwagentje code :
en mijn code
heb al 2 uur liggen zoeken, en vind de fout echt niet
Zoals ik zei, het is gewoon de update die hij niet uitvoert, hij refresht de pagina, maar wijzigt het gewoon niet
http://users.pandora.be/necrolite/dbasemtp.mdb
en dit is de database, in geval van...
dus bijvoorbeeld ik heb maar 1 winkelgoed geselecteert maar wil er 3 van maken, dus neem je 3 update order.
Als ikhet op mijn pagina doe, blijft hij op 1 staan

iemand een idee?
Origineel winkelwagentje code :
<%@ Language=VBScript %>
<% pageTitle = "Review Order" %>
<!-- #include file="db.asp" -->
<!-- #include file="adovbs.inc" -->
<%
'******************************************************
'Copyright©2000-2002 MetaLinks.com @ http://metalinks.com
'******************************************************
%>
<html>
<head>
<meta name="GENERATOR" Content="Microsoft Visual Studio 6.0">
<title><%= pageTitle %></title>
<script LANGUAGE="JavaScript"><!--
function AbortEntry(sMsg, eSrc)
{
window.alert(sMsg);
// set focus and highlight to the offending error
eSrc.focus();
//eSrc.select();
}
function HandleError(eSrc)
{
// make sure they input a numeric value
// (in VBScript you'd use the IsNumeric() function)
var val = parseInt(eSrc.value);
if (isNaN(val))
{
return AbortEntry("Must be a number.", eSrc);
}
// make sure the value is in range
if (val < 0)
{
return AbortEntry("Number cannot be less than zero.", eSrc);
}
}
//-->
</script>
<style type="text/css">
<!--
a:link { color: #808080 }
a:visited { color: #808080 }
a:hover { color: #ff9900 }
-->
</style>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" text="#808080">
<basefont face="Verdana" size="2">
<table border="0" width="100%" cellpadding="4" cellspacing="1">
<tr>
<td valign="top" nowrap><img border="0" src="images/mcartfree.gif" WIDTH="249" HEIGHT="64"></td>
<td valign="bottom" nowrap align="right"><font face="Verdana" size="1"> </font></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#666666" height="20" align="left" valign="middle" nowrap colspan="4"> <font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><a style="color: #FFFFFF; text-decoration: none" href="http://www.metalinks.com/default.htm"><img src="images/icon.gif" border="0" align="middle" WIDTH="16" HEIGHT="16"> metalinks.com</a> |
<b> <a href="default.asp" style="color:#FFFFFF;text-decoration:none;">Home</a> |
<a href="mailto:[email protected]" style="color:#FFFFFF;text-decoration:none;">Customer
Service</a> | <a href="reviewOrder.asp" style="color:#FFFFFF;text-decoration:none;">View
Cart</a></b> | <a href="search.asp" style="color:#FFFFFF;text-decoration:none;">
Product Search</a></b></font></td>
</tr>
</table>
<hr color="#cccccc" size="1" noshade>
<table border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" width="625">
<tr>
<td width="128" valign="top" align="center">
<table border="0" cellspacing="4" cellpadding="4" width="125">
<tr>
<td width="128" bgcolor="#FFFFFF"><b><font color="#ff9900" size="3" face="Arial"><i>Live
Demo</i></font></b><br>
<br>
<font face="Verdana" color="#808080" size="1">This store and
its products are for demonstration purposes only. You cannot
actually purchase any of the products, nor is there a secure server
to process your order.</font><br>
<br>
<br>
<font face="Verdana" size="2" color="#808080"><a href="moreinfo.asp"><br>
<b>More info</b><br>
</a><a href="mailto:[email protected]"><b>Contact us</b></a></font><br>
</td>
</tr>
</table>
<td width="1" bgcolor="#000000"><img src="images/spacer.gif" width="1" height="1" alt border="0"></td>
<td align="left" valign="top"><table border="0" cellspacing="4" cellpadding="4"><tr><td>
<%
set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open ConString
if cstr(Session("orderID")) = "" then
Response.Write "<div align='center'>"
Response.Write "<p><font face='Verdana' size='4'><b>"
Response.Write "There is no current order." & "<br>"
Response.Write "If you had previously added items to your order, "
Response.Write "your session may have timed out.<br><br>"
Response.Write "<a href='default.asp'>Continue Shopping</a>"
Response.Write "<b></font></p>"
Response.Write "</div>"
else
intOrderID = cstr(Session("orderID"))
sqlText = "select products.productID, productName, " _
& "productPrice, quantity from products, " _
& "itemsOrdered where " _
& "products.productID = itemsOrdered.productID "_
& "and itemsOrdered.orderID = " & intOrderID
%>
<p><font face="Verdana" size="4"><strong>Review Your Order</strong></font></p>
<p><font face="Verdana" size="2">Please review your order to be certain it is correct.
To remove an item, set the quantity to zero and press Update Order button.</font></p>
<form action="checkout.asp" method="post" id="form1" name="form1">
<table border="1" cellpadding="3" cellspacing="3" width="100%">
<tr bgcolor="#ff9900">
<td width="15%" align="left" valign="center" nowrap><font color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR: #ff9900"><strong>Quantity<strong></font></strong></strong></td>
<td width="44%" align="left" valign="center" nowrap><font color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR: #ff9900"><strong>Product Name<strong></font></strong></strong></td>
<td width="16%" align="left" valign="center"><font color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR: #ff9900"><strong>Unit Price<strong></font></strong></strong></td>
<td width="25%" align="right" valign="center" nowrap><font color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR: #ff9900"><strong>Extended Price<strong></font></strong></strong></td>
</tr>
<%
set rsReview = Conn.Execute(sqlText)
while not rsReview.EOF
intProdID = rsReview("productID")
strProdName = rsReview("productName")
intProdPrice = rsReview("productPrice")
intQuant = rsReview("quantity")
intTotal = intTotal + (intQuant * intProdPrice)
%>
<tr>
<td width="15%" valign="center" align="left"><font face="Verdana" size="2">
<input name="quant<%= intProdID %>" size="3" value=" <%=intQuant%>" onChange="HandleError(this)">
</font></td>
<td width="44%" align="left"><font face="Verdana" size="2"> <%= strProdName %>
</font></td>
<td width="16%" align="right"><font face="Verdana" size="2">
$<%= formatNumber(intProdPrice, 2) %>
</font></td>
<td width="25%" align="right"><font face="Verdana" size="2">
$<%= formatNumber((intQuant * intProdPrice), 2) %>
</font></td>
</tr>
<%
rsReview.MoveNext
wend
rsReview.Close
set rsReview = Nothing
%>
<tr>
<td valign="center" align="left"><font face="Verdana" size="2"><strong>Total:<strong></font></strong></strong></td>
<td colspan="3" align="right" valign="center"><font face="Verdana" size="2"><strong>
$<%= formatNumber(intTotal,2) %>
<strong></font></strong></strong></td>
</tr>
</table>
<p><input type="submit" name="control" value="Update Order">
<input type="submit" name="control" value="Go To Check-Out"></p>
</form>
<form action="default.asp" method="post" id="formx" name="formx">
<input type="submit" name="buttonX" value="Continue Shopping">
</form>
<%
end if
Conn.Close
set Conn = Nothing
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<hr color="#cccccc" size="1" noshade>
<table border="0" cellpadding="0" cellspacing="6" width="100%">
<tr>
<td colspan="3" valign="BOTTOM"><font face="Verdana, Arial, Helvetica" size="1">
Last Updated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%A, %B %d, %Y" startspan -->Saturday, July 07, 2001<!--webbot bot="Timestamp" endspan i-checksum="49640" -->
<br>
Powered by <a href="http://metalinks.com/metacart.htm">MetaCart</a>,
©2000-2002 <a href="http://metalinks.com/">MetaLinks.com</a><br>
</font></td>
<td colspan="3" align="right" valign="TOP">
</td>
</tr>
</table>
</body>
</html>
en mijn code
<%@ language="vbscript"%>
<% pageTitle = "Review Order" %>
<!-- #include file="connection.asp" -->
<!-- #include file="adovbs.inc" -->
<html>
<head>
<title>Untitled Document</title>
<link href="opmaak.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><img src="Images/headerdeel1.jpg" width="800" height="194"></td>
</tr>
<tr>
<td width="238" height="4" valign="top" background="Images/onderkantnormaal01.jpg"></td>
<td width="562" height="4" valign="top" background="Images/onderkantnormaal06.jpg"></td>
</tr>
<tr>
<td width="237" height="330" valign="top" background="Images/onderkantnormaal02.jpg" class="productlijst">Voorbumpers<br>
Achterbumpers<br>
Zijschorten<br>
Velgen<br>
ICE<br>
Lichten<br>
Motortuning<br> </td>
<td height="330" width="564" valign="top" background="Images/onderkantnormaal05.jpg"><p>
<%
set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open strConnstring
if cstr(Session("OrderID")) = "" then
Response.Write "<div align='center'>"
Response.Write "<p><font face='Verdana' size='4'><b>"
Response.Write "There is no current order." & "<br>"
Response.Write "If you had previously added items to your order, "
Response.Write "your session may have timed out.<br><br>"
Response.Write "<a href='default.asp'>Continue Shopping</a>"
Response.Write "<b></font></p>"
Response.Write "</div>"
else
intOrderID = cstr(Session("OrderID"))
sqlText = "select tblProducten.Merk, Type, " _
& "Prijs, quantity from tblProducten, " _
& "itemsOrdered where " _
& "tblProducten.productID = itemsOrdered.ProductID "_
& "and itemsOrdered.OrderID = " & intOrderID
%>
</p>
<p><p><font face="Verdana" size="4"><strong>Review Your Order</strong></font></p>
<p><font face="Verdana" size="2">Please review your order to be certain it is correct.
To remove an item, set the quantity to zero and press Update Order button.</font></p>
<form action="checkout.asp" method="post" id="form1" name="form1">
<table border="1" cellpadding="3" cellspacing="3" width="100%">
<tr bgcolor="#ff9900">
<td width="15%" align="left" valign="center" nowrap><font color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR: #ff9900"><strong>Quantity<strong></font></strong></strong></td>
<td width="44%" align="left" valign="center" nowrap><font color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR: #ff9900"><strong>Product Name<strong></font></strong></strong></td>
<td width="16%" align="left" valign="center"><font color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR: #ff9900"><strong>Unit Price<strong></font></strong></strong></td>
<td width="25%" align="right" valign="center" nowrap><font color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR: #ff9900"><strong>Extended Price<strong></font></strong></strong></td>
</tr>
<%
set rsReview = Conn.Execute(sqlText)
while not rsReview.EOF
intProdID = rsReview("Merk")
strProdName = rsReview("Type")
intProdPrice = rsReview("Prijs")
intQuant = rsReview("quantity")
intTotal = intTotal + (intQuant * intProdPrice)
%>
<tr>
<td width="15%" valign="center" align="left"><font face="Verdana" size="2">
<input name="quant<%= intProdID %>" size="3" value=" <%=intQuant%>" onChange="HandleError(this)">
</font></td>
<td width="44%" align="left"><font face="Verdana" size="2"> <%= strProdName %>
</font></td>
<td width="16%" align="right"><font face="Verdana" size="2">
$<%= formatNumber(intProdPrice, 2) %>
</font></td>
<td width="25%" align="right"><font face="Verdana" size="2">
$<%= formatNumber((intQuant * intProdPrice), 2) %>
</font></td>
</tr>
<%
rsReview.MoveNext
wend
rsReview.Close
set rsReview = Nothing
%>
<tr>
<td height="25" align="left" valign="center"><font face="Verdana" size="2"><strong>Total:<strong></font></strong></strong></td>
<td colspan="3" align="right" valign="center"><font face="Verdana" size="2"><strong>
$<%= formatNumber(intTotal,2) %>
<strong></font></strong></strong></td>
</tr>
</table>
<p><input type="submit" name="control" value="Update Order">
<input type="submit" name="control" value="Go To Check-Out"></p>
</form>
<form action="default.asp" method="post" id="formx" name="formx">
<input type="submit" name="buttonX" value="Continue Shopping">
</form>
<%
end if
Conn.Close
set Conn = Nothing
%></p>
</td>
<tr>
<td width="237" height="33" valign="top" background="Images/onderkantnormaal03.jpg">
</td>
<td height="33" width="564" valign="top" background="Images/onderkantnormaal04.jpg"> </td>
</tr>
</table>
</body>
</html>
heb al 2 uur liggen zoeken, en vind de fout echt niet

Zoals ik zei, het is gewoon de update die hij niet uitvoert, hij refresht de pagina, maar wijzigt het gewoon niet
http://users.pandora.be/necrolite/dbasemtp.mdb
en dit is de database, in geval van...

