I am trying to use jquery-ui for modal form & dialog.
In a confirmation dialogue, on click event, i want to call a
controller action.
Notice the code for Delete button handler.

[CODE]
$(document).ready(function() {
$('.delurl').click(function(e){
 $("#deptDel").dialog({
       modal: true,
       buttons: {
                "Delete": {{=URL('controller_name', args=[a,b,..])}}

                "Cancel": function() {
                    $( this ).dialog( "close" );
[/CODE]

Is it all right to use URL helper in javascript function
OR
is there any downside in coding like this?
If so, what is the best practice for such requirement?

Thanks,
Vineet

Reply via email to