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

  • SEARCH
  • Home
  • 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 7784509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:06:22+00:00 2026-06-01T20:06:22+00:00

Bascially when a user hits the delete button, the script must confirm from user

  • 0

Bascially when a user hits the delete button, the script must confirm from user if he wants to delete or not. I want to pass the id of a row. I am using input type=”image” and onclick brings up the box. How do I pass $row_id[‘id] to the js script.

<script type="text/javascript">
function show_confirm()
{
var r=confirm("Do you want to delete");
if (r==true)
  {
    window.location = "delete.php";
  //alert("You pressed OK!");
  }
else
  {

  }
}
</script>


<input type="image" src='../images/delete.jpg' width='30px' height='30px' style="position:relative; top:0px;" onclick="show_confirm()">
  • 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-01T20:06:24+00:00Added an answer on June 1, 2026 at 8:06 pm
        <input type="image" src='../images/delete.jpg' 
          width='30px' height='30px' style="position:relative; top:0px;" 
          onclick="show_confirm(<?php echo $row_id["id"]; ?>)" />​
    

    and get id in javascript function,

    function show_confirm(id)
    {
    if (confirm("Do you want to delete image-"+id))
      {
        window.location = "delete.php";
      //alert("You pressed OK!");
      }
    else
      {
    
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, I do not want the user to enter '0' (zero) as the first
This is what I want to happen.. When a user hits 'enter' a 'SearchForItems()'
I want to make a site where there user can basically navigate the web
Basically I want to check what url the user is on and compare it
Basically I want 200 characters maximum to come up in Console.ReadLine() for user input
I'm writing a c# application that requires user authentication. When the user hits the
I'm creating word by word coloring tool. Basically user can select few letters from
Basically when user resizes my application's window I want application to be same size
I have a pretty standard upload form - user picks a file, then hits
bascially, how should i do it now that using the asp:listview control is out

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.