Avatar billede remo27 Nybegynder
05. oktober 2004 - 00:16 Der er 5 kommentarer og
1 løsning

hjælp til radio form

jeg søger:

script som sender et valg fra en radio form ned til et valg
Avatar billede fennec Nybegynder
05. oktober 2004 - 08:10 #1
Det må du nok forklare lidt bedre :o)
Avatar billede remo27 Nybegynder
05. oktober 2004 - 16:57 #2
jeg er ved at lave en shop, man har 2 muligheder, for at betale fragt,
1 valg, hvis man bor i vendsyssel koster det 50, da de briger det ud. 
2 valg så koster det 100 kr. da det så bliver sendt. så de 50 eller 100 kr. skal sende vidre i scriptet.


shopping.asp


<center>
<%
' ** Inserted by Jon Brohauge 2002/08/08
Dim SQLstmt, itemSQL, RS, itemRs, iMinID, iMaxID, vnr, img, desc, price, sBody

'** Informationer påkrævet til Ordrebekræftelse:
Dim  sSellerName, sSellerAdresse, sSellerPostnr, sSellerCity, sSellerPhone, sSellerFax, sSellerEmail, sMailHost

sMailHost = "smtp.mail.dk"
sSellerName = "jgsDemo butik"
sSellerAdresse = "jgsVej 999"
sSellerPostnr = "1234"
sSellerCity = "jgsBy"
sSellerPhone = "+45 12345678"
sSellerFax = "+45 98765432"
sSellerEmail = " rmo@pc.dk"

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.MapPath("jgs.mdb")

Sub AddItemToCart(iItemID, iItemCount)
    If dictCart.Exists(iItemID) Then
        dictCart(iItemID) = dictCart(iItemID) + iItemCount
    Else
        dictCart.Add iItemID, iItemCount
    End If
    Response.Write iItemCount & " af varenummer " & iItemID & " blev tilføjet indkøbskurven.<BR><BR>" & vbCrLf
End Sub

Sub RemoveItemFromCart(iItemID, iItemCount)
    If dictCart.Exists(iItemID) Then
        If dictCart(iItemID) <= iItemCount Then
            dictCart.Remove iItemID
        Else
            dictCart(iItemID) = dictCart(iItemID) - iItemCount
        End If
        Response.Write iItemCount & " af varenummer " & iItemID & " blev fjernet fra indkøbskurven.<BR><BR>" & vbCrLf
    Else
        Response.Write "Ingen varer af denne type blev fundet i indkøbskurven.<BR><BR>" & vbCrLf
    End If
End Sub

Sub ShowItemsInCart()
Dim Key
Dim aParameters ' as Variant (Array)
Dim sTotal, sShipping
   
    %>
    <TABLE Border=1 CellPadding=3 CellSpacing=1>
        <TR>
            <TD class="bar">Varenummer</TD>
            <TD class="bar">Beskrivelse</TD>
            <TD class="bar">Antal</TD>
            <TD class="bar">Ret Antal</TD>
            <TD class="bar">Enhedspris</TD>
            <TD class="bar">Subtotal</TD>
        </TR>
    <%
    sTotal = 0
    For Each Key in dictCart
        aParameters = GetItemParameters(Key)
        %>
        <TR>
            <TD ALIGN="Center"><%= aParameters(0) %></TD>
            <TD ALIGN="Left"><%= aParameters(2) %></TD>
            <TD ALIGN="Center"><%= dictCart(Key) %></TD>
            <TD ALIGN="Left"><A HREF="./default.asp?action=add&item=<%= Key %>&count=1&emne=<%=emne%>" title="Tilføj en"><img src="images/ico_add.gif" alt="Tilføj en" width="16" height="16" border="0"></A>&nbsp;&nbsp;<a href="./default.asp?action=del&item=<%= Key %>&count=1&emne=<%=emne%>" title="Fjern en"><img src="images/ico_delete.gif" alt="Fjern en" width="16" height="16" border="0"></A>&nbsp;&nbsp;<A HREF="./default.asp?action=del&item=<%= Key %>&count=<%= dictCart(Key) %>&emne=<%=emne%>" title="Fjern Alle">Fjern</A></TD>
            <TD ALIGN="Right"><%=FormatCurrency(aParameters(3))%></TD>
            <TD ALIGN="Right"> <%=FormatCurrency(dictCart(Key) * CSng(aParameters(3)),2)%></TD>
        </TR>
        <%
        sTotal = sTotal + (dictCart(Key) * CSng(aParameters(3)))
    Next
    If sTotal <> 0 Then
        Dim shippingRs, shippingWeight, dWeight
    shippingWeight = 0
    Set shippingRs = Server.CreateObject("ADODB.RecordSet")
      For Each Key in dictCart
      Set shippingRs = conn.Execute("SELECT weight FROM jgs WHERE id =" & Key)
      shippingWeight = cDbl(shippingWeight) + (dictCart(Key)*cDbl(shippingRs("weight")))
    Next
    dWeight = Replace(FormatNumber(shippingWeight,2), ",", ".")
    Set shippingRs = conn.Execute("SELECT weightPrice FROM weight WHERE weightLow <= " & dWeight & " AND " & dWeight & " < weightHigh")
    sShipping = shippingRs("weightPrice")
    Else
        sShipping = 0
    End If
    sTotal = sTotal
    %>
    <TR><TD COLSPAN=5 ALIGN="Right"><B>Total incl. moms:</B></TD><TD ALIGN="Right"><%= FormatCurrency(sTotal,2) %></TD></TR>
    </TABLE>
    <%
End Sub

Sub ShowFullCatalog()
Dim aParameters ' as Variant (Array)
Dim I
Dim iItemCount ' Number of items we sell
    ' If you are really going to use this sample this should probably be pulled from a DB
  SQLstmt = "SELECT MIN(id) AS MinItemID, MAX(id) AS MaxItemID FROM jgs WHERE emne LIKE '" & emne & "'"
  Set RS = Conn.Execute(SQLstmt)
    iMinID = RS("MinItemID")
    iMaxID = RS("MaxItemID")
    %>
    <TABLE Border=0 CellPadding=3 CellSpacing=1>
        <TR>
            <TD class="bar">Billede</TD>
            <TD class="bar">Beskrivelse</TD>
            <TD class="bar">Enhedspris</TD>
            <TD class="bar">Tilføj indkøbskurv</TD>
        </TR>
    <%
    For I = iMinID to iMaxID
        aParameters = GetItemParameters(I)
        %>
        <TR>
            <TD><IMG SRC="<%= aParameters(1) %>"></TD>
            <TD><b><%= aParameters(2) %></b></TD>
            <TD><b><%=FormatCurrency(aParameters(3))%></b></TD>
            <TD><A HREF="./default.asp?action=add&item=<%= I %>&count=1&emne=<%= emne %>"><img src="images/BUY.GIF" alt="Tilføj til Indkøbskurven" width="16" height="13" border="0"></A></TD>
        </TR>
        <%
    Next 'I
    %>
    </TABLE>
    <%
End Sub

Sub PlaceOrder()
  Dim Key
  Dim aParameters ' as Variant (Array)
  Dim sTotal, sShipping

  sBody = "<TABLE Border=1 CellPadding=3 CellSpacing=1>"
  sBody = sBody & "  <TR>"
  sBody = sBody & "    <TD>Varenummer</TD>"
  sBody = sBody & "    <TD>Beskrivelse</TD>"
  sBody = sBody & "    <TD>Antal</TD>"
  sBody = sBody & "    <TD>Enhedspris</TD>"
  sBody = sBody & "    <TD>Subtotal</TD>"
  sBody = sBody & "  </TR>"
    sTotal = 0
    For Each Key in dictCart
        aParameters = GetItemParameters(Key)
    sBody = sBody & "  <TR>"
    sBody = sBody & "    <TD>" & aParameters(0) & "</TD>"
    sBody = sBody & "    <TD>" & aParameters(2) & "</TD>"
    sBody = sBody & "    <TD>" & dictCart(Key) & "</TD>"
    sBody = sBody & "    <TD>" & FormatCurrency(aParameters(3)) & "</TD>"
    sBody = sBody & "    <TD>" & FormatCurrency(dictCart(Key) * CSng(aParameters(3)),2) & "</TD>"
    sBody = sBody & "  </TR>"
        sTotal = sTotal + (dictCart(Key) * CSng(aParameters(3)))
    Next
    'Calculate shipping - you might want to pull this out into a function if your shipping
    ' calculations are more complicated then ours.  ;)
    If sTotal <> 0 Then
        Dim shippingRs, shippingWeight, dWeight
    shippingWeight = 0
    Set shippingRs = Server.CreateObject("ADODB.RecordSet")
      For Each Key in dictCart
      Set shippingRs = conn.Execute("SELECT weight FROM jgs WHERE id =" & Key)
      shippingWeight = cDbl(shippingWeight) + (dictCart(Key)*cDbl(shippingRs("weight")))
    Next
    dWeight = Replace(shippingWeight, ",", ".")
    Set shippingRs = conn.Execute("SELECT weightPrice FROM weight WHERE weightLow <= " & dWeight & " AND " & dWeight & " < weightHigh")
    sShipping = shippingRs("weightPrice")
    Else
        sShipping = 0
    End If
    sTotal = sTotal

  sBody = sBody & "<TR><TD COLSPAN=4 ALIGN=""Right""><B>Total excl. moms:</B></TD><TD ALIGN=""Right"">" & FormatCurrency((sTotal*4/5),2) & "</TD></TR>"
 
    'if request.form("inden") = "1" then
    '    sBody = sBody & "<TR><TD COLSPAN=4 ALIGN=""Right""><B>Total incl. moms:</B></TD><TD ALIGN=""Right"">" & FormatCurrency(sTotal,2)+50 & "</TD></TR>"
    'elseif request.form("inden") = "2" then
        sBody = sBody & "<TR><TD COLSPAN=4 ALIGN=""Right""><B>Total incl. moms:</B></TD><TD ALIGN=""Right"">" & FormatCurrency(sTotal,2) & "</TD></TR>"
    'end if
  sBody = sBody & "</TABLE>"
End Sub

Sub GenerateEmailConfirmation()
  Dim sSubject, sBodyText
  Dim sUserName, sUserAdresse, sUserPostnr, sUserCity, sUserAtt, sUserTlf, sUserFax, sUserEmail, sDeliveryNavn, sDeliveryAdresse, sDeliveryPostnr, sDeliveryCity, sDeliveryNote
  Dim fakturaConn, fInsertSQL, dInsertSQL, faktID, itemSQL, Key, aParameters, sSubTotal, sTotal, sShipping
  Set fakturaConn = Server.CreateObject("ADODB.Connection")
  fakturaConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.MapPath("faktura.mdb")

  sUserName = Request.Form("navn")
  sUserAdresse = Request.Form("adresse")
  sUserPostnr = Request.Form("postnr")
  sUserCity = Request.Form("city")
  sUserAtt = Request.Form("att")
  sUserTlf = Request.Form("tlf")
  sUserFax = Request.Form("fax")
  sUserEmail = Request.Form("email")
  sDeliveryNavn = Request.Form("dnavn")
  sDeliveryAdresse = Request.Form("dadresse")
  sDeliveryPostnr = Request.Form("dpostnr")
  sDeliveryCity = Request.Form("dcity")
  sDeliveryNote = Request.Form("note")
  sSubject = "Ordrebekræftelse fra butikken"

' Brug dictCart til at regenerere varene til databasen, samt varelisten i emailordrebekræftelsen
  fInsertSQL = "INSERT INTO FKA_FakturaAddress (FKA_BuyerName, FKA_BuyerAddress, FKA_BuyerZipCode, FKA_BuyerCity, FKA_BuyerAtt, FKA_BuyerPhone, FKA_BuyerFax, FKA_BuyerEmail) VALUES ('" & sUserName & "', '" & sUserAdresse & "', '" & sUserPostnr & "', '" & sUserCity & "', '" & sUserAtt & "', '" & sUserTlf & "', '" & sUserFax & "', '" & sUserEmail & "')"
  fakturaConn.Execute(fInsertSQL)
  Set faktID = fakturaConn.Execute("SELECT @@IDENTITY FROM FKA_FakturaAddress")
  If len(sDeliveryNavn)>0 Then
    dInsertSQL = "INSERT INTO FKA_FakturaAddress (FKA_ParentID, FKA_BuyerName, FKA_BuyerAddress, FKA_BuyerZipCode, FKA_BuyerCity, FKA_Note) VALUES (" & faktID(0) & ", '" & sDeliveryNavn & "', '" & sDeliveryAdresse & "', '" & sDeliveryPostnr & "', '" & sDeliveryCity & "', '" & sDeliveryNote & "')"
    fakturaConn.Execute(dInsertSQL)
  End If
  sTotal = 0
  sBodyText = sBodyText & "Ordrebekræftelse" & vbCrLf
  sBodyText = sBodyText & "--- --- --- --- " & vbCrLf & vbCrLf
  sBodyText = sBodyText & "Afsender: " & vbCrLf
  sBodyText = sBodyText & sSellerName & vbCrLf
  sBodyText = sBodyText & sSellerAdresse & vbCrLf
  sBodyText = sBodyText & sSellerPostnr & " " & sSellerCity & vbCrLf
  sBodyText = sBodyText & "Tlf: " & sSellerPhone & vbCrLf
  sBodyText = sBodyText & "Fax: " & sSellerFax & vbCrLf
  sBodyText = sBodyText & "Email: " & sSellerEmail & vbCrLf
  sBodyText = sBodyText & "--- --- --- --- " & vbCrLf & vbCrLf
  sBodyText = sBodyText & "Betalingsadresse: " & vbCrLf
  sBodyText = sBodyText & sUserName & vbCrLf
  sBodyText = sBodyText & "Att: " & sUserAtt & vbCrLf
  sBodyText = sBodyText & sUserAdresse & vbCrLf
  sBodyText = sBodyText & sUserPostnr & " " & sUserCity & vbCrLf
  If Len(sDeliveryNavn) > 0 Then
    sBodyText = sBodyText & "--- --- --- --- " & vbCrLf & vbCrLf
    sBodyText = sBodyText & "Leveringsadresse: " & vbCrLf
    sBodyText = sBodyText & sDeliveryNavn & vbCrLf
    sBodyText = sBodyText & sDeliveryAdresse & vbCrLf
    sBodyText = sBodyText & sDeliveryPostnr & " " & sDeliveryCity & vbCrLf
  End If
  If Len(sBodyText) > 0 Then
    sBodyText = sBodyText & "Notat: " & sDeliveryNote & vbCrLf
  End If
  sBodyText = sBodyText & "--- --- --- --- " & vbCrLf & vbCrLf
  sBodyText = sBodyText & "Ordrenummer: " & faktID(0) & vbCrLf
  sBodyText = sBodyText & "Ordredato: " & FormatDateTime(now, 1) & vbCrLf
  sBodyText = sBodyText & "--- --- --- --- " & vbCrLf & vbCrLf
  sBodyText = sBodyText & "Bestilte varer: " & vbCrLf
  For Each Key in dictCart
    aParameters = GetItemParameters(Key)
    itemSQL = "INSERT INTO FKI_FakturaItem (FKI_FKA_ID, FKI_ItemNumber, FKI_ItemCount, FKI_Description, FKI_Pris, FKI_Emne) VALUES (" & faktID(0) & ", '" & aParameters(0) & "', '" & dictCart(Key) & "', '" & aParameters(2) & "', '" & aParameters(3) & "', '" & emne & "')"
    fakturaConn.Execute(itemSQL)
    sBodyText = sBodyText & "Varenummer: " & aParameters(0) & vbCrLf
    sBodyText = sBodyText & "Beskrivelse: " & aParameters(2) & vbCrLf
    sBodyText = sBodyText & "Antal: " & dictCart(Key) & vbCrLf
    sBodyText = sBodyText & "Enhedspris: " & FormatCurrency(aParameters(3),2) & vbCrLf
    sSubTotal = dictCart(Key) * CSng(aParameters(3))
    sBodyText = sBodyText & "SubTotal: " & FormatCurrency(sSubTotal,2) & vbCrLf
    sBodyText = sBodyText & " --- --- " & vbCrLf
    sTotal = sTotal + sSubTotal
  Next
    If sTotal <> 0 Then
        Dim shippingRs, shippingWeight, dWeight
    shippingWeight = 0
    Set shippingRs = Server.CreateObject("ADODB.RecordSet")
      For Each Key in dictCart
      Set shippingRs = conn.Execute("SELECT weight FROM jgs WHERE id =" & Key)
      shippingWeight = cDbl(shippingWeight) + (dictCart(Key)*cDbl(shippingRs("weight")))
    Next
    dWeight = Replace(shippingWeight, ",", ".")
    Set shippingRs = conn.Execute("SELECT weightPrice FROM weight WHERE weightLow <= " & dWeight & " AND " & dWeight & " < weightHigh")
    sShipping = shippingRs("weightPrice")
    Else
        sShipping = 0
    End If
    sTotal = sTotal
  sBodyText = sBodyText & "Total excl. moms: " & FormatCurrency((sTotal*4/5),2) & vbCrLf
  sBodyText = sBodyText & "Total incl. moms: " & FormatCurrency(sTotal,2)
  ' Send email til kunde

  SendEmailMessage sUserEmail, sSellerEmail, sSubject, sBodyText
  ' Send email til sælger
  SendEmailMessage sSellerEmail, sSellerEmail, sSubject, sBodyText
'** TESTING
End Sub

Function DebugOut(dbgStr)
  Response.Write "<small>" & dbgStr & "</small><br>" & vbCrLf
End Function

Function htmlFormat(str)
  htmlFormat = Replace(str, vbCrLf, "<br>")
End Function

Function GenerateKeyString()
  Dim Key, sTemp
  Dim aParameters ' as Variant (Array)
  sTemp = ""
    For Each Key in dictCart
        aParameters = GetItemParameters(Key)
    sTemp = sTemp & Key & ":" & dictCart(Key) & "::"
    Next
  GenerateKeyString = Server.URLEncode(sTemp)
End Function

' We implemented this this way so if you attach it to a database you'd only need one call per item
Function GetItemParameters(iItemID)
  Dim aParameters ' Will contain 3 string values : image path, description, price
                ' However we need to keep price so it can be converted to a
                ' single for computation hence no currency symbol.  This array
                ' can also be expanded to contain any other information about the
                ' product that you might want to pull from the DB.
  itemSQL = "SELECT varenr, images, beskrivelse, pris FROM jgs WHERE id=" & iItemID
  Set itemRs = Conn.Execute(itemSQL)
  If not(itemRs.bof or itemRs.eof) Then
    vnr = itemRs("varenr")
    img = itemRs("images")
    desc = itemRs("beskrivelse")
    price = CStr(itemRs("pris"))
  End If
  aParameters = Array(vnr, img, desc, price)
' Return array containing product info.
GetItemParameters = aParameters
End Function
%>

<% ' ***** Begin the infamous runtime script *****
' Declare our Vars
Dim dictCart ' as dictionary
Dim sAction ' as string
Dim iItemID ' as integer
Dim iItemCount ' as integer

' Get a reference to the cart if it exists otherwise create it
If IsObject(Session("cart")) Then
    Set dictCart = Session("cart")
Else
    ' We use a dictionary so we can name our keys to correspond to our
    ' item numbers and then use their value to hold the quantity.  An
    ' array would also work, but would be a little more complex and
    ' probably not as easy for readers to follow.
    Set dictCart = Server.CreateObject("Scripting.Dictionary")
End If

' Get all the parameters passed to the script
sAction = CStr(Request("action"))
iItemID = CInt(Request("item"))
iItemCount = CInt(Request("count"))
emne = Request("emne")
%>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD>
<%
' Select action based on user input
Select Case sAction
    Case "add"
        AddItemToCart iItemID, iItemCount
        ShowItemsInCart
        %>
        </TD></TR>
        <TR><TD ALIGN="right">
        <A HREF="./default.asp?emne=<%=emne%>&action="><IMG SRC="./images/shop_look.gif" BORDER=0 WIDTH=46 HEIGHT=46 ALT="Find flere varer"></A>
        <A HREF="./default.asp?action=checkout&emne=<%=emne%>"><IMG SRC="./images/shop_checkout.gif" BORDER=0 WIDTH=46 HEIGHT=46 ALT="Indkøbskurv"></A><BR>
        <%
    Case "del"
        RemoveItemFromCart iItemID, iItemCount
        ShowItemsInCart
        %>
        </TD></TR>
        <TR><TD ALIGN="right">
        <A HREF="./default.asp?emne=<%=emne%>&action="><IMG SRC="./images/shop_look.gif" BORDER=0 WIDTH=46 HEIGHT=46 ALT="Find flere varer"></A>
        <A HREF="./default.asp?action=checkout&emne=<%=emne%>"><IMG SRC="./images/shop_checkout.gif" BORDER=0 WIDTH=46 HEIGHT=46 ALT="Indkøbskurv"></A><BR>
        <%
    Case "viewcart"
        ShowItemsInCart
        %>
        </TD></TR>
        <TR><TD ALIGN="right">
        <A HREF="./default.asp?emne=<%=emne%>&action="><IMG SRC="./images/shop_look.gif" BORDER=0 WIDTH=46 HEIGHT=46 ALT="Find flere varer"></A>
        <A HREF="./default.asp?action=checkout&emne=<%=emne%>"><IMG SRC="./images/shop_checkout.gif" BORDER=0 WIDTH=46 HEIGHT=46 ALT="Indkøbskurv"></A><BR>
        <%
    Case "checkout"
'        Dim sBody
    %>
        </TD></TR>
        <TR><TD ALIGN="left">
    <form action="./default.asp?action=sendinfo&emne=<%=emne%>" method="post">
    <table border="1" width="400">
      <tr>
        <td width="100%">
          <table border="1" width="100%" height="460">
            <tr>
              <td width="100%" colspan="2" height="19">Faktura information</td>
            </tr>
            <tr>
              <td width="50%" height="23">Navn</td>
              <td width="50%" height="23"><input type="text" name="navn" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="23">Adresse</td>
              <td width="50%" height="23"><input type="text" name="adresse" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="23">postnr.</td>
              <td width="50%" height="23"><input type="text" name="postnr" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="17">by</td>
              <td width="50%" height="17"><input type="text" name="city" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="19">att.rek</td>
              <td width="50%" height="19"><input type="text" name="att" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="19">Tlf</td>
              <td width="50%" height="19"><input type="text" name="tlf" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="19">fax</td>
              <td width="50%" height="19"><input type="text" name="fax" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="19">email</td>
              <td width="50%" height="19"><input type="text" name="email" size="20"></td>
            </tr>
            <tr>
              <td width="100%" height="19" colspan="2"><input type="radio" name="inden" value="1">&nbsp;+50.- kr i fragt inden for Vendsyssel</td>
            </tr>
            <tr>
              <td width="100%" height="19" colspan="2"><input type="radio" name="inden" value="2">&nbsp;+100.- kr i fragt uden for Vendsyssel</td>
            </tr>
            <tr>
              <td width="100%" colspan="4" height="38">Leverings adresse<br>
                Udfyldes kun hvis der skal leveres på en anden adresse.</td>
            </tr>
            <tr>
              <td width="50%" height="19">Navn</td>
              <td width="50%" height="19"><input type="text" name="dnavn" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="19">adresse</td>
              <td width="50%" height="19"><input type="text" name="dadresse" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="19">postnr</td>
              <td width="50%" height="19"><input type="text" name="dpostnr" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="19">by</td>
              <td width="50%" height="19"><input type="text" name="dcity" size="20"></td>
            </tr>
            <tr>
              <td width="50%" height="19">Note</td>
              <td width="50%" height="19"><textarea rows="4" name="note" cols="26"></textarea></td>
            </tr>
            <tr>
              <td width="50%" height="25"><input type="submit" value="Submit" name="B1"></td>
              <td width="50%" height="25"><input type="reset" value="Reset" name="B2"></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    </form>
        <%
        PlaceOrder
    Response.Write sBody
  Case "sendinfo"
    PlaceOrder
    GenerateEmailConfirmation
    %>
        </TD></TR>
        <TR><TD ALIGN="right">
    <table border="1" width="400">
      <tr>
        <td width="100%">
          <table border="1" width="100%">
            <tr>
              <td width="100%" height="19">Ordre bekræftelse:</td>
            </tr>
            <tr>
              <td>Tak for ordren. Der er sendt en ordrebekræftelse til den emailadresse noteret på forrige side.</td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="100%"><%=sBody%></td>
      </tr>
    </table>
    <%
    Case Else ' Shop
        ShowFullCatalog
        %>
        </TD></TR>
        <TR><TD ALIGN="right">
        <A HREF="./default.asp?action=viewcart&emne=<%=emne%>"><IMG SRC="./images/shop_cart.gif" BORDER=0 WIDTH=46 HEIGHT=46 ALT="Se Indkøbskruv"></A>
        <%
End Select

' Return cart to Session for storage
Set Session("cart") = dictCart
%>
</TD></TR>
</TABLE>
</center>
Avatar billede zod Nybegynder
05. oktober 2004 - 16:59 #3
er det hele koden du har postet der??
Avatar billede remo27 Nybegynder
05. oktober 2004 - 17:01 #4
yes, shopping delen, hvor den også laver varekurven, og betalings delen
Avatar billede fennec Nybegynder
06. oktober 2004 - 08:43 #5
Det lader til at du submitter til end anden side en denne.

Du har ellers lavet det rigtigt i linje 174 (selv om det er udkommenteret). Jeg har brug for submit siden også, ellers kan jeg ikke se hvad der sker.
Avatar billede remo27 Nybegynder
27. oktober 2004 - 21:26 #6
jeg lukker igen
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester