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

IndexedDB delete record not working

i just got the code from the following link

Getting Started with IndexedDB

While running the delete function it doesn't throw an error..but still delete Function didn't work


Expand|Select|Wrap|Line Numbers
  1. btnDelete.addEventListener("click", function () {
  2. var id = document.getElementById('txtID');
  3. var transaction = db.transaction(['people'], 'readwrite');
  4. var objectStore = transaction.objectStore('people');
  5. var request = objectStore.delete(id);
  6. request.onsuccess = function (evt) {
  7. };             
  8. });

while the remaining functions ADD,PRINT works,
Also updates in the IDB, but DELETE doesn't work
For reference check the url mentioned above..

Please figure it out,
Thanks in advance
Apr 24 '13 #1

✓ answered by vijay6

Hey gowthamavel, is you trying to delete 'textbox' or 'textbox value' in your IndexedDB? (Check line number 2 in your code)

4 3501
vijay6
158 100+
Hey gowthamavel, is you trying to delete 'textbox' or 'textbox value' in your IndexedDB? (Check line number 2 in your code)
Apr 24 '13 #2
I have changed the code as follows but still it didn't work

Expand|Select|Wrap|Line Numbers
  1. var id = document.getElementById('txtID').value;
  2.  
Apr 24 '13 #3
vijay6
158 100+
Hey gowthamavel, use explicit casting (convert textbox value from string to int).
Apr 24 '13 #4
Thanks a lot!!
Its working!!
Apr 24 '13 #5

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

Similar topics

3
by: Uwe Range | last post by:
Hi to all, I am displaying a list of records in a subform which is embedded in a popup main form (in order to ensure that users close the form when leaving it). It seems to be impossible to...
2
by: durga | last post by:
i want delete a record from sql2000 using deletequery in asp.net. Actually delete query in asp.net is working fine in my local host but not woring remote side after deploy the project. Any body...
3
by: Phi | last post by:
Hi, I hope somebody could help me with this problem. I would like to make a form to add and delete records from my ms access database. I've found most of the codes from the internet and...
3
by: igendreau | last post by:
I'm trying to clean up a database of mine, and I need to convert some old DAO code over to ADO. When I was using DAO, I had no problem running this script and deleting the record using rs.Delete. ...
6
by: JHNielson | last post by:
This is a very simple question.... I have a form that looks up Records for an unbound drop-down list. It has worked just fine up until last night. Now the button on the form to delete a record...
4
by: Craggy | last post by:
Hi, I am trying to pop up a yes/no message box so that a user can delete a record in a continuous form. The default delete message is a bit sloppy because it seems to move the continuous form to...
3
by: Phil Stanton | last post by:
I have a form based on a complex query (Lots of tables) If I delete a record, everything appears to be OK. Get the message "Youa are about to delete 1 record ....". I say yes. The record count...
3
by: shapper | last post by:
Hello, I have a table named Tags with the following columns: TagId and TagValue. How can I delete a record, using LINQ, given the TagId value. Thanks, Miguel
4
by: barkarlo | last post by:
I use check box in a form "frmworkorder" like confirmation that's record finish. How can I write code who will block edit and delete record in form when is check box confirmed.
1
by: CreativeMind | last post by:
hi all, private void dgMygrid_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { Button bDelete=(Button)e.Item.FindControl("btnDelete"); if(bDelete!=null) {...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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
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,...

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.