javascript - Capturing removeObject from indexedDB -


Using a cursor, I am displaying all items in my indexed DB. For my assignment, we need to create an administrator account at the page launch. I have used a local storage API to record that this account has not been created to create this admin account continuously. When a new user is created and displayed, there is a deletion button next to his name.

I am trying to launch the function that will change the local level of the administrator key: function adminRemoved (), if the administrator account was to be deleted but I do not know that I How capable of capturing the event.

This function is used to show the list of all users in DB:

  Function Show User List (e) {// var results = e.target .result; //databox.innerHTML = '& lt; Div & gt; + Result.id + '-' + result.name + '-' + result.date + '& lt; / Div & gt; '; Var cursor = e.target.result; // Capture many return values ​​as a cursor. // if (cursor) {databox.inner html + = '& lt; Div & gt; + Cursor.value.userName + '-' + Cursor.ViewAffan + '-' + Cursor.valen '-' + cursor.values.v + '-' + cursor.valem + '-' + cursor.value.dob + '-' + cursor.value ++++ + + cursor.value.bio + '-' + cursor.valuitem + '-' + cursor .vuxccc + '-' + cursor.valuegar + '& lt; Input type = "button" onclick = "removeobject (\ '' + cursor.value.userName + '\')" value = "remove" /> gt; & Lt; / Div & gt; '; // html cursor Add remove button as insert; // etres on cursor}}   

I want to turn on this function when the administrator account is removed:

  function adminRemoved () {var Admin = 'administrator'; Var position = 'Deleted'; NewItem (administrator, status); } 

Your function does not meet the names of Onclick, it says "to be deleted" The name of the function is "adminRemoved" and give them the same name and insert "javascript:" before working on your button's onclick event. it should work.

Maybe to make it easy to control, using some Linux like jQuery. It would be easy to engage events.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -