Dear All,
Spent good amount of time on this but couldn’t find a solution
I am trying to use Jquery Confirmation 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/
My case 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
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} "
)
)
);