473,466 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Javascript alert() when deleting rec with gridview

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.

May 26 '06 #1
1 1468
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');
}
}

May 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: SP | last post by:
Hi, I need a GridView that when I click on a row or on a HyperLinkField a javascript call raise . It is possible? The grid is in a window open from a parent window. Onclick in a row selected,...
5
by: HockeyFan | last post by:
We have an update panel that has a gridview with checkboxes and other items in each row. We went to the RowCreated event in the codebehind, to set an attribute on a checkbox in each row, to...
4
by: marksommerville | last post by:
I have a few questions regarding accessing a gridview control from Javascript which I would really appreciate some help with. 1. The gridview contains a column of checkboxes as a template field....
7
by: Vladzeem | last post by:
Hi there, I have a problem to access a checkbox inside GridView using row index using javascript. Here is the code: var c; var cellValue; var rCount = 0; var cellControl; gridViewCtl =...
1
by: TarheelsFan | last post by:
I am creating a web site that allows admins to edit the website from within the site (add contacts, events, etc.) After modifying the content by either adding, editing, or deleting some info, I...
0
by: nospam | last post by:
Hello, I need a column in a GridView to trigger a javascript function ( to play an MP3 file). I am catching the RowCreated event from the GridView. I then add my javascript code like this: ...
7
by: Fabio Mastria | last post by:
Looks like a joke... : As I say in the subject... I create a javascript file, with this function: function IndexChanged(source){ alert("Hallo");
3
by: nigelesquire | last post by:
Please help! I'm trying to clone and delete multiple rows with JavaScript. I need two delete buttons that work...! I only have one for now, but it's not working properly, the output count is...
12
by: btreddy | last post by:
Hii Experts, im facing a problem with the javascript validation.i've a gridview in my web form and added a footer tempalte and placed textboxes in tht tempalte ,just to add a new row to the...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.