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 5965333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:36:52+00:00 2026-05-22T19:36:52+00:00

After as much research as possible I don’t have a working solution to what

  • 0

After as much research as possible I don’t have a working solution to what seems a simple problem.

I would like to use Jquery Impromptu.

Simple action.

  1. Click on Logout – <a class="link" href="javascript:;" onclick="logout(1); ">Logout</a>

  2. Prompt ‘Are you sure – Yes / No’

  3. If Cancel, Nothing happens. If True go to a url ‘logoutscript.php’.

I cannot get my thoughts to work and though I just cannot get my head around it. Any help would be really helpful.

++++++++++++++++++++++++++++++++++

function removeUser(id){
var txt = 'Are you sure you want to Logout?';

$.prompt(txt,{ 
buttons:{Logout:true, Cancel:false},
callback: function(v,m,f){

<!-- This is wher the problem starts -->

++++++++++++++++++++++++++++++++++

 a class="link" href="javascript:;" onclick="removeUser(1); ">Logout</a>
  • 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-05-22T19:36:53+00:00Added an answer on May 22, 2026 at 7:36 pm

    This should work:

    HTML

    <a class="link" href="#" data-id="1">Logout</a>
    

    JS

    function removeUser(id) { 
        var txt = 'Are you sure you want to Logout?';
        $.prompt(txt, { 
            buttons: {
                Logout: true, 
                Cancel: false
            }, 
            callback: function(accept) {
                if (accept) {
                    window.location = "logoutscript.php";
                }
                return false;
            }
        });
    }
    
    $('a.link').click(function() {
        removeUser($(this).data('id'));
        return false;
    });
    

    You can as well call the method inline, if you need to.

    For the future: Please provide complete and formatted code. In your list a method is called logout, in the code sample removeUser, then the code breaks up after an opening curly bracket.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I've decided after much debate and research to use symfony on my next
After much research I am still stumped. I have a serial port object which
After much research, I have learned that binding the scroll event to the $(window)
New to Javascript, but after some research it loks like this would be the
After much research and trial and error I found how to store the items
After much googling I have been wondering what the benefits/differences are between mysql and
After much fiddling, I've managed to install the right ODBC driver and have successfully
OK, after much research, and help with stackoverflow users, I've narrowed down how to
After much research I am a little confused by which identity tracker I should
I installed PHP and MySql separately, configured IIS and php.ini, after much research I

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.