Jump to content

Search the Community

Showing results for tags 'delete.php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. Hi all, Bit of a dilema. If I add, update items through the Modal form, all works well. But, if I delete an item, everything works fine, but the window stays greyed out. Even if I check a checkbox and delete that way it works fine. The Delete part of the Ajax: $(document).on("click", ".delete", function() { var id=$(this).attr("data-id"); $('#id_d').val(id); }); $(document).on("click", "#delete", function() { $.ajax({ url: "includes/save.php", type: "POST", cache: false, data:{ type:3, id: $("#id_d").val() }, success: function(dataResult){ $('#deleteDriverModal').modal('hide'); $("#"+dataResult).remove(); } }); }); Here is the Multiple Delete section: $(document).on("click", "#delete_multiple", function() { var user = []; $(".user_checkbox:checked").each(function() { user.push($(this).data('user-id')); }); if(user.length <=0) { alert("Please select records."); } else { WRN_PROFILE_DELETE = "Are you sure you want to delete "+(user.length>1?"these":"this")+" row?"; var checked = confirm(WRN_PROFILE_DELETE); if(checked === true) { var selected_values = user.join(","); console.log(selected_values); $.ajax({ type: "POST", url: "includes/save.php", cache:false, data:{ type: 4, id : selected_values }, success: function(response) { var ids = response.split(","); for (var i=0; i < ids.length; i++ ) { $("#"+ids[i]).remove(); } } }); } } }); $(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip(); var checkbox = $('table tbody input[type="checkbox"]'); $("#selectAll").click(function(){ if(this.checked){ checkbox.each(function(){ this.checked = true; }); } else{ checkbox.each(function(){ this.checked = false; }); } }); checkbox.click(function(){ if(!this.checked){ $("#selectAll").prop("checked", false); } }); }); If anyone could help that would be great.
  2. Hi, I'm working on a new site. And i can't get my code to work properly. I have already made a site with this script and it works just fine, but it will not work on my new site (wordpress with PHP enable). What I need is an alternative to this code (the delete button command): <td><a onclick="return confirmSubmit()" <a href="?slettID=<?php echo $row_persondata2['id']; ?>"><img src="images/Delete-button.bmp" name="Image3" width="45" height="20" border="0" id="Image3" /></a><a href="?slettID=<?php echo $row_persondata2['id']; ?>"></a> <script LANGUAGE="Javascript"> <!-- // Skript for Confirmasjon-delete function confirmSubmit() { var agree=confirm("Er du sikker på at du vil slette denne hendelsen?"); if (agree) return true ; else return false ; } // --> </script> <a href="update.php?oppdaterID=<?php echo $row_persondata2['id']; ?>"><img src="images/Update-button.bmp" width="45" height="20" border="0" /></a></td> </tr> <?php } while ($row_persondata2 = mysql_fetch_assoc($persondata2)); ?> </table> Take a look at my attachment. What i want is a delete button that is asking "are you sure?" and then if i click yes it delete that row from the database. Is there an easy alternative? Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.