473,378 Members | 1,384 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 2145
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.