Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Javascript alert() when deleting rec with gridview

Reply
Thread Tools

Javascript alert() when deleting rec with gridview

 
 
loga123
Guest
Posts: n/a
 
      05-26-2006
I am using a gridview with ASP 2.0 and VB.Net 2005. I would like to be
able to pop-up a javascript alert('Are you sure') confirmation when the
user clicks the 'Delete link' without adding an additional column for
this, but I cannot figure out how. Can someone help? Thanks.

 
Reply With Quote
 
 
 
 
Jimi200478
Guest
Posts: n/a
 
      05-26-2006
you will have to point the "delete link" to a javascript function.
inside that javascript function, add the confirmation. you will have to
create a processing page to perform the delete, but this will give you
the desired result.

function ShowConfirmProcessing(url)
{
var result = confirm("You have selected items for
processing. This cannot be undone. Are you sure that you want to
proceed?")
if(result == true)
{
location.href = url;
}
else
{
alert('No accounts have been processed');
}
}

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: slicing a bsddb table, eg. for rec in bsddb["AArdvark":"zebra"]:print rec Skip Montanaro Python 1 06-26-2005 08:49 PM
slicing a bsddb table, eg. for rec in bsddb["AArdvark":"zebra"]:print rec Neville C. Dempsey Python 0 06-12-2005 06:22 PM
Re: goodbye rec.photo.digital -hello rec.photo.digital.slr-systems? Woodchuck Bill Digital Photography 15 10-27-2004 04:29 AM
Digital Photography RFD: rec.photo.digital.slr vs rec.photo.digital.slr-systems? Lionel Digital Photography 16 09-17-2004 12:48 PM
2nd RFD: rec.photo.digital.slr (was: rec.photo.dslr) Thad Digital Photography 217 09-08-2004 06:33 PM



Advertisments