OK, I made some progress. This works at firefox just fine. But at
safari dialog is showed but nothing is done after the click. At IE
dont work at all only div with dialog content is showed.


Here is what Ive got now:

<script type="text/javascript">
        $(function() {
                var myID;

                        $("#dialog-delete").dialog({
                                autoOpen: false,
                                bgiframe: true,
                                resizable: false,
                                width: 400,
                                modal: true,
                                overlay: {
                                        backgroundColor: '#000',
                                        opacity: 0.5
                                },
                                buttons: {
                                        'Delete': function() {
                                                $.ajax({
                                                   type: "POST",
                                                   url: "index.php?
view=main&control=module&module=articles&action=browse",
                                                   data: "id="+ myID,
                                                });
                                                $(this).dialog('close');
                                                location.reload();
                                        },
                                        'Cancel': function() {
                                                $(this).dialog('close');
                                        }
                                }
                        });

                $([<?php echo $recordsIDs ?>]).each(function() {
                var num = this;

                $('#dialog_link_' + num).click(function() {
                                myID = num;
                        $('#dialog-delete').dialog('open');
                        });
        });
        });
</script>

and at before the </body> tag I have

<div id="dialog-delete" title="Smazat data">
        <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0
7px 20px 0;"></span>Are you sure you want to delete this record ?</p>
</div>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to