473,394 Members | 2,020 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,394 software developers and data experts.

delete prompt box is not working

Expand|Select|Wrap|Line Numbers
  1. "Delete" : function() {
  2.  
  3.                     var result = prompt("Want to delete?");
  4.                 if (result==true) {
  5.                     deleteUser(userId);
  6.             }
  7.  
  8.  
  9.                 },
May 18 '14 #1
5 1318
stdq
94 64KB
I think the call to prompt should be:
Expand|Select|Wrap|Line Numbers
  1. var result = window.prompt( "Want to delete?" )
Also, anything the user enters that is not an empty string (or null, if that's possible to be entered) will be considered true.
May 18 '14 #2
Dormilich
8,658 Expert Mod 8TB
hm, why do you use a prompt() when a confirm() would be the obvious choice?
May 18 '14 #3
how to make the confirm box as center of the page in all browsers.
May 19 '14 #4
In this code pop-up looks fine but delete fn not working.
May 19 '14 #5
Dormilich
8,658 Expert Mod 8TB
how to make the confirm box as center of the page in all browsers
you make your own confirm box as you have no influence over how browsers implement the native confirm box.
May 19 '14 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: MJ | last post by:
Hi I have created a prog for link list I am addig a node, displaying the LL contents, reversing the LL and deleting the LL In the delete() if I use free I am getting memory exception I have used...
1
by: Eric Bettan | last post by:
Hello, I have an ASP.NET web application that generates a temporary image file on the server, streams it to the client, and then deletes the file. Everything works fine when running on Windows...
3
by: J.P. Cummins | last post by:
In my ASP.NET application, I wish to have a page for administrators to edit items in a list. Preferably, I would like to use the javascript prompt for the 'rename' function, and a javascript alert...
2
by: Ryan Liu | last post by:
private void dt_RowDeleted(object sender, DataRowChangeEventArgs e) { int id= (int)e.Row; if(id >5) { e.Row.RejectChanges(); MessageBox.Show(this, "Can not delete!" + id); }
0
by: Shane_SDE | last post by:
I am attempting to use a FormView control with an ObjectDataSource. I have the Select and Update working correctly. I tried to add a Delete Command to either the Edit or the Item Templates and it...
7
by: Dabbler | last post by:
My gridview Delete command works until I install a confirm prompt as follows, then it does nothing. Any suggestions would be appreciated! protected void MyGridView_RowCreated( object sender,...
9
ihaveaquery
by: ihaveaquery | last post by:
Hi, Delete is working fine for me, but Update- Nothing is happening. Please find the code snippet below and help me out... <asp:GridView ID="empGrid" runat="server" AllowSorting="True"...
2
by: DAnDA | last post by:
ASP.net 2 ,,,i have a gridview using sqldatasource,,,, when i click on delete the page just refreshe and the records never get deleted ,,, Is there any way to figure out what's going on and how...
6
by: DavidPr | last post by:
This is a classified ads table which contains all the item's information. The item's "id" is received on this delete page using $id = $_GET;. It's being sent bydelete_picture.php?id=$id A query...
1
by: CoreyReynolds | last post by:
Hello, I have attached a picture of my Access form. Each record has a delete button beside it, pressing it deletes the record and cascades to the child records. Horray. Except sometimes, for a...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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
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...

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.