This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1E08D.213C3910
Content-Type: text/plain;
charset="iso-8859-1"
add an onsubmit="return yourfunction();" to the form for the deletion. in
your function return false if they hit no and it will stop your form from
being submitted. Hope that helps.
David Debreceni
Senior Visual Basic/ASP Developer
xxx-xxx-xxxx x 1086
-----Original Message-----
From: Vandael Tim [mailto:vandael_tim@h...]
Sent: Wednesday, April 10, 2002 4:14 AM
To: javascript
Subject: [javascript] Confirmation box using ASP pages ????
This i my code for now on.
When i want to delete a record, i want him to ask me a confirmation
of what i am doing.
So that i can not by accident, delete a record.
I have tried with some java-scripts, but there was still the same problem,
when i pressed NO on the confirmation box, he still deleted the record.
Tim
<%
response.write ("<table width=""100%"" border=""1""
align=""center""><tr><td width=""50""
align=""center""><b>SheetID</b></td><td width=""120""
align=""center""><b>Workcenter Code</b></td><td align=""center""
width=""120""><b>Artikel Code</b></td><td align=""center""
width=""80""><b>Afdeling</b></td><td align=""center""
width=""170""><b>Omschrijving</b></td><td align=""center"" ><b>File-
naam</b></td><td align=""center"" ><b>Update</b></td><td align=""center""
><b>Delete</b></td></tr>")
do until rsSoort.EOF
response.write ("<tr>")
response.write ("</td><td align=""center"">")
response.write rsSoort("instrID")
response.write ("<td align=""center"">")
response.write rsSoort("insMachine")
response.write ("</td><td align=""center"">")
response.write rsSoort("insArtikel")
response.write ("</td><td align=""center"">")
response.write rsSoort("insAfdeling")
response.write ("</td><td align=""center"">")
response.write rsSoort("insOmschrijving")
response.write ("</td><td align=""center"">")
%>
<a href="e:\-== Nexans ==-\shopfloor\files\<%
=rsSoort("insFileNaam")%>" alt="<%=rsSoort("insFileNaam")%>"
TARGET="_blank"><%=rsSoort("insFileNaam")%></a>
<%
response.write ("</td><td align=""center""
valign=""center"">")
'FORM Update van artikel---------------------------------------------------
--------
' TEST DOELEINDEN : response.write rsSoort("instrID")
%>
<form action="update.asp" name="update"
id="update" method="POST">
<input type="hidden" name="artid" value="<%
=rsSoort("instrID")%>">
<input type="Submit" name="update"
value="update">
</form>
<%
response.write ("</td><td align=""center""
valign=""center"">")
'FORM Delete van artikel---------------------------------------------------
-------
%>
<form action="del.asp" method="post" name="delete"
id="delete">
<input type="hidden" name="artid"
value="<%=rsSoort("instrID")%>">
<input type="Submit" name="del"
value="delete">
</form></td>
<%
rsSoort.movenext
loop
response.write ("</table><br>")
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20