Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8570083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:28:46+00:00 2026-06-11T18:28:46+00:00

I have a script like this: <script type=text/javascript> function DeletePublisher(publisherid) { jConfirm(‘Are you sure

  • 0

I have a script like this:

<script type="text/javascript">
function DeletePublisher(publisherid) {
jConfirm('Are you sure you want to delete this publisher?', 'Delete publisher', function(r) { if (r)

scriptitem = document.createElement('script');
scriptitem.type = 'text/javascript';
scriptitem.src = 'includes/publishers/delete-publisher.php?publisherid=' + publisherid;
scriptitem.id = 'ajax';
document.body.appendChild(scriptitem);
setTimeout('document.body.removeChild(document.getElementById("ajax"))', 500);  

$.jGrowl('Publisher deleted');
window.location.reload();
});
}
</script>

And I am listing rows in table like this:

TD ROWS HERE...
<td class="unpaid-th"><strong><?php echo $publisher_unpaid; ?></strong></td>
                <td class="action-th">
                    <ul class="button-table-head">
                        <li><div class="button-head edit-icon"><a href="#" class="sweet-tooltip" data-text-tooltip="Edit" data-style-tooltip="tooltip-mini-slick"><span>Edit</span></a></div></li>
                        <li><div class="button-head delete-icon"><a href="#" class="sweet-tooltip" data-text-tooltip="Delete" data-style-tooltip="tooltip-mini-slick" onclick="DeletePublisher('<?php echo $publisher_id; ?>')"><span>Delete</span></a></div></li>
                    </ul>
                </td>

Now what should happen is when I click on delete link – it should post/get (whatever – as i use $_REQUEST on listener script) to php script that will get the id of publisher and delete it from DB…. But the problem seems to be that no ID is actually send to delete script and I’ve tried everything….

It displays nice in source code like onclick=”DeletePublisher(‘152’)” and prompts alerts, infos etc… but it seems that it’s not sending ID….. OR NOW MAYBE NOT EVEN CALLING A LISTENER script (don’t know how to test it) 🙁

Any ideas what’s wrong here (or maybe different approach?) ?

Thanks a lot !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:28:47+00:00Added an answer on June 11, 2026 at 6:28 pm

    I would recommend using AJAX like below which uses jQuery

    function DeletePublisher(publisherid) {
      jConfirm('Are you sure you want to delete this publisher?', 'Delete publisher', function(r) { if (r)
        $.ajax({
          type: "POST", //or GET
          url: 'includes/publishers/delete-publisher.php?publisherid=' + publisherid,
          data: '',
          success: function(response){
            $.jGrowl('Publisher deleted');
            window.location.reload();
          }
        });
      });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a code like this <script type=text/javascript> function email(){ var myTextField = document.getElementById('email_hidden').value;
I have written something like this in PHP <script type=text/javascript src=jquery.js></script></script> <script type=text/javascript> function
I would like to have a script in the head like this: <script type=text/javascript
i have code like this: <script type=text/javascript> var _gaq = _gaq || []; _gaq.push(['_setAccount',
I have index.php like this: <script type=text/javascript src=jquery-1.4.2.js></script> <script type=text/javascript src=ajax.js></script> <a href='one.php' class='ajax'>One</a>
i have script like this.... <head> <meta http-equiv=content-type content=text/html; charset=iso-8859-1 /> <meta name=author content=bbbbb
I have a script that looks like this #!/bin/bash function something() { echo hello
I have a javascript function that works as I would like : <script language=javascript
I have script like this : fullscript.sh if [ ! -f /opt/laks/linux-2.6.33.2.tar.bz2 ] then
I have a batch script that looks like this: Test.bat @echo off :: Starts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.