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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:56:36+00:00 2026-05-28T13:56:36+00:00

I am trying to use Jquery Dialog box in place of Java script standard

  • 0

I am trying to use Jquery Dialog box in place of Java script standard confirmation dialog box for my project

I googled and found below nice Jquery confirmation dialogues

http://labs.abeautifulsite.net/archived/jquery-alerts/demo/

I am currently using Yii framework

I am having rows of data with delete option for each row . Clicking on the delete link asks for the confirmation and based on user input it deletes the row .

For that I am using below Java script code. It is Working perfect and no issues

"onclick"=>"if (
            !confirm('Are you sure?\\r\\nYou are going to unregister for this subject.')
              ) {     return      }

But now to use the above Jquery dialog I don’t find a way to implement exactly like above .
Below is the code I tried

"onclick"=>"if (
            !jConfirm('Can you confirm this?', 'Confirmation Dialog', 
                 function(r) {
                               return r ; 
                              }
                      )
                ){    return     } "

But this didn’t help and I even tried some other possibilities too .. But none of them helped . Could some one provide the correct way to handle the above case .

Or if there are other dialog boxes that helps me for my case ..

Thank You

Regards

Kiran

Full code where I am calling this

    echo (
            CHtml::ajaxLink(
                   'Delete',
                    Yii::app()->createUrl("editcourses/removeCourse"),
                    array(
                            "type"=>"POST",
                            "data"=>array(
                                    "place_type"=>$courses[$i]['course_type'],
                                    "place_id"=>$course[$i]['course_code'],
                            ),
                            "success"=>'js:function(data){  }',
                    ),
                    array(
                            "onclick"=>"
                                if (!jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
                                    return r ; })){return} "
                    )
            )
    );
  • 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-28T13:56:37+00:00Added an answer on May 28, 2026 at 1:56 pm

    I got the answer and here it is

        CHtml::ajaxLink(Delete,'','',
    array( "onclick"=>"                                         
        var parObj=$(this).parent().parent();
        if (!jConfirm('Are you sure?\\r\\nYou are going to unregister for this course.', 'Confirmation', function(result)                    {                                                if(result){                                               
        jQuery.ajax(
            {'type':'POST',
            'data':{'place_type':parObj.attr('place_type'),'place_id':parObj.attr('place_id')},
            'url':'index.php?r=editProfile/removeCourse',
            'cache':false,
            'success':function(data){ 
                var obj = jQuery.parseJSON(data);
                $('tr[place_id=\"' + obj.place_id + '\"][place_type=\"' + obj.place_type + '\"]').remove();
            }
            }); 
        }
        })){return }
    
            "
    )
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use the jQuery UI Dialog to display a confirmation prior to
I´m trying to use jQuery-UI´s dialog to create a confirmation dialog attached to a
I am trying to use confirmation dialog from jQuery UI . I ran into
So I am trying to use FullCalendar and jQuery UI dialog box. And i'm
I'm trying to use jquery ui dialog and google maps... so when an user
I'm trying to use the jQuery BlockUI Plugin to block a jQuery dialog while
I'm trying to use jQuery UI 1.7.3 datepicker widget in a jQuery UI dialog.
I am trying to use jquery dialog, but the following code shows 0, 1
i'm trying to use javascript code inside jquery dialog and my code executes more
I am trying to use the jQuery dialog UI library in order to position

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.