VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 Hakkatil''s referer code
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ken Moyer
Starting Member

8 Posts

Posted - March 10 2003 :  22:14:21  Show Profile  Reply with Quote
I downloaded and installed Hakkatil's referer code from his test site and it works fine except I cannot get the delete function to work, the page just reloads. Has anyone else had this problem?

Ken Moyer
Starting Member

8 Posts

Posted - March 18 2003 :  00:18:16  Show Profile  Reply with Quote
So far no takers on this one... maybe posting the source will help.
It looks as though the onclick reloads the page before the delete happens.
Any ideas?

'----------------------------------------------CASE DELETE-------------------------------------------------------
case "delete"
for n = 1 to objRS.recordcount step perpage
if n <> 1 then response.write "<p align=center><font face='Verdana' size=2 color='#FFFFEE'> | "


response.write "<a href="""
response.write request("script_name") & "?start=" & n
response.write """>"
response.write n & " to "
if n + perpage <= objRS.recordcount then
response.write n + (perpage) - 1
else
response.write objRS.recordcount
end if
response.write "</a></font>"

next
if request("start") = "" then
start = 1
else
start = cint(request("start"))
end if


objRs.move start - 1
%>
<form action"show.asp" method=POST name=deleteform>
<%
c1="#006464"

for row = start to start + (perpage - 1)
if objRs.eof then
exit for
end if
%>

<tr bgcolor="<%=c1%>">
<td width="60%">
<p style="margin-left: 10"> <font face="Verdana" size=1 color="#FFFFEE"><b>
 <%response.write objRs("refer")%>

</b></font>
</td>

<td width="15%"> <p style="margin-left: 10">
<font face="Verdana" size=1 color="#FFFFEE"> <% response.write objRs("refererIP") %> </font> </td>

<td width="10%"> <p style="margin-left: 10">
<font face="Verdana" size=1 color="#FFFFEE">  <% response.write objRs("refdate") %> </font> </td>

<td width="15%"> <p style="margin-left: 10">
<font face="Verdana" size=1 color="#FFFFEE">  <% response.write objRs("reftime") %> </font> </td>
<td>

<input type="checkbox" name="DeleteUser" value="<%=objRs("refererID")%>"></td>
<%

if c1 = "#006464" then c1 = "#009191" else c1 = "#006464"

objRs.movenext
next %>

<tr>
<td colspan="5"><center><input type="submit" name="Deletebutton" value="Delete Selected Entry" onclick="javascript:location.reload()"></center></td>
</tr> </form>
<%
If Request("Deletebutton")<>"" Then

For each item in Request("DeleteUser")
d = "DELETE * FROM referer WHERE refererID = " & item
objRs.Execute(d)
Next
End If

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000