Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Alert Message??

Status
Not open for further replies.

csiwa28

Programmer
Apr 12, 2001
177
Hi everyone,

I have an asp page that displays all my records from an Access database. After each record, I have a delete button. That delete button has the following form action:

Response.write &quot;<form action='removeitem.asp?PRODUCT_ID=&quot; & GetRecord(&quot;Product_ID&quot;) & &quot;' method=post>&quot;

NOTE:
The PRODUCT_ID will always be different for each item.
GetRecord(&quot;Product_ID&quot;) pulls the item's product id from the database.

My question is, when a user clicks on the delete button, how do i have an alert/message box[(OK/Cancel),(Yes/NO), etc]. When the user clicks yes, it'll process the form action and when they click no, it'll do nothing?
 
sub Save()
dim iReturn
iReturn = MsgBox (&quot;Are you Sure?&quot;, 4, &quot;Sure?&quot;)
select case iReturn
case 6 'Yes
submit it
case 7 'No
end select
end sub
 
So when the user presses the button, it should call that sub routine? The product id should be passed to the sub routine? Then what happens to the form action?
 
right like so
<input type=button name=save onClick='Save()'>

If the productid is a field on the form then no
need to do anything since you are using the post method.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top