473,473 Members | 2,286 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

JavaScript Confirm before submit

I have a datagrid that users interact with to
add/edit/delete, but before the .aspx submits for the
delete action I want to pop up a JavaScript confirm box.

If the user clicks OK on that box I want the page to be
submited and to delete the item(s) from the grid, if the
user clicks CANCEL I don't want the page to do a postback.

So far I have everything working except the JavaScript
confirm box (in other words the delete just happens
without the user confirming). Can anybody please help me
with getting the confirm to work (I don't even know where
to start)?

Thanks,
Jeremy
Jul 21 '05 #1
2 2148
You can do this using JavaScript and Template column of
Datagrid as given in the following Link

http://authors.aspalliance.com/aldot...amples/cd.aspx

-Gopi
-----Original Message-----
I have a datagrid that users interact with to
add/edit/delete, but before the .aspx submits for the
delete action I want to pop up a JavaScript confirm box.
If the user clicks OK on that box I want the page to be
submited and to delete the item(s) from the grid, if the
user clicks CANCEL I don't want the page to do a postback.
So far I have everything working except the JavaScript
confirm box (in other words the delete just happens
without the user confirming). Can anybody please help mewith getting the confirm to work (I don't even know whereto start)?

Thanks,
Jeremy
.

Jul 21 '05 #2
Thanks, I think this will help me out!

Jeremy
-----Original Message-----
You can do this using JavaScript and Template column of
Datagrid as given in the following Link

http://authors.aspalliance.com/aldot...amples/cd.aspx

-Gopi
-----Original Message-----
I have a datagrid that users interact with to
add/edit/delete, but before the .aspx submits for the
delete action I want to pop up a JavaScript confirm

box.

If the user clicks OK on that box I want the page to be
submited and to delete the item(s) from the grid, if the
user clicks CANCEL I don't want the page to do a

postback.

So far I have everything working except the JavaScript
confirm box (in other words the delete just happens
without the user confirming). Can anybody please help

me
with getting the confirm to work (I don't even know

where
to start)?

Thanks,
Jeremy
.

.

Jul 21 '05 #3

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

Similar topics

7
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes...
4
by: fig000 | last post by:
Hi, I'm relatively new to Javascript so please bear with me on what might sound like silly questions. This is what I want to do: I'm working in classic asp (I have to for this project). I...
2
by: Greg T | last post by:
Hi, I have a rather long form that I don't want people submitting unless they are absolutely sure they are ready. I figured the easiest way to prevent an accidental form submission by way of...
14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
1
by: Muhammad Abdullah | last post by:
Hi am having some problems with the javascript confirm. i have it working fine on one page and it doesnt even pop up at the other. The code on the working page is, private void...
6
by: tshad | last post by:
I am trying to set up a Javascript popup box that has a way of sending back a message to asp.net on how to process some data. At the moment I am just doing: ...
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
3
by: TJ | last post by:
Hi, I would like to ask something to user after user submits the form... I know I can ask user whehter they want to submit the form or not using client-script code such as onClick or onSubmit by...
8
by: Dave | last post by:
Hello all, I have been able to use a Javascript alert box in my vb.net web application, for example: Dim msg As String = "Hello, world." Dim alertScript As String = "<script...
6
by: Peter Afonin | last post by:
Hello, I'm creating an application in ASP.NET 1.1. I need to check whether at least one checkbox in my datagrid has been checked. To do this, I'm using Javascript - I'm adding this code 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
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...
1
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: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
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...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.