In case this is the problem, read:

http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/

- Richard

On Thu, Dec 10, 2009 at 9:42 AM, moleculezz <[email protected]> wrote:

> Hi again,
> I have tried your code and it loads up the dialog, but the div#edit
> and div#delete are shown at the bottom. So it's not reading the dialog
> properties I set. When I click on delete or edit they both hide
> div#delete and div#edit and then load div#edit in the dialog. I can
> also only load the dialog once, after that it doesn't work any more.
>
>
> On Dec 10, 2:52 pm, Sultan Imanhodjaev <[email protected]>
> wrote:
> > Hello :) try this code I am sorry of my code I was busy so I did some
> > mistakes :)
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
> http://www.w3.org/TR/html4/strict.dtd";>
> > <html>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> > <title>Untitled Document</title>
> > <script language="JavaScript" type="text/javascript"
> > src="js/jquery-min.js"></script>
> > <script language="JavaScript" type="text/javascript"
> > src="js/ui/ui.core.js"></script>
> > <script language="JavaScript" type="text/javascript"
> > src="js/ui/ui.dialog.js"></script>
> > <link rel="stylesheet" type="text/css" href="js/themes/base/ui.all.css"
> />
> > <script type="text/javascript">
> > TOOLKIT = {
> >        refreshHandlers : function() {
> >                $('#members t...@class=edit] a').each(function() {
> >                        $(this).unbind('click', TOOLKIT.showEditDialog);
> >                        $(this).bind('click', function(){
> >
> > TOOLKIT.showEditDialog.call($(this).attr('id'));
> >                        });
> >                });
> >                $('#members t...@class=delete] a').each(function() {
> >                        $(this).unbind('click',
> > TOOLKIT.showDeleteConfirmDialog);
> >                        $(this).bind('click', function(){
> >
> > TOOLKIT.showDeleteConfirmDialog.call($(this).attr('id'));
> >                        });
> >                });
> >        },
> >
> >        showEditDialog: function(row_id){
> >                $('#edit').dialog({
> >                //
> >                //
> >                //
> >                        beforeclose: function(){
> >                                TOOLKIT.refreshHandlers()
> >                        }
> >                });
> >
> >                // and do something with the current row :p
> >                //var old = $('t...@id="' + row_id +
> '"')[SOME_FIELD].text();
> >        },
> >
> >        showDeleteConfirmDialog: function(){
> >                $('#del').dialog({
> >
> >                        autoOpen: false,
> >                        show: 'blind',
> >                        hide: 'fold',
> >                        width: 400,
> >                        modal: true,
> >                        buttons: {
> >                                "Confirm": function() {
> >                                        document.del-member.submit();
> >                                },
> >                                "Cancel": function() {
> >                                        $(this).dialog('close');
> >                                }
> >                        },
> >                        beforeclose: function(){
> >                                that.refreshHandlers()
> >                        }
> >                });
> >
> >                 // and do something with the current row :p
> >                var fname = $('t...@id="' + row_id + '" td.fname').text();
> >                var lname = $('t...@id="' + row_id + '" td.lname').text();
> >                var fullname = fname + " " + lname;
> >
> >                // add some stuff to the dialog's GUI etc....
> >                $("#del span.name").html(fullname);
> >
> >                var row = row_id.split('_');
> >                var id = row[1];
> >                $("#del input#profile_id").val(id);
> >        }
> >
> > }
> >
> > $(document).ready(function(){
> >        TOOLKIT.refreshHandlers();
> >
> > });
> >
> > </script>
> > </head>
> > <body>
> > <table cellspacing="1" cellpadding="0" class="tbl-style">
> > <tbody id="members">
> > <tr id="uid_1">
> >        <td class="fname">Jamie</td>
> >        <td class="lname">Jefferson</td>
> >        <td class="edit"><a href="#">edit</a></td>
> >    <td class="delete"><a href="#">delete</a></td>
> > </tr>
> > <tr id="uid_2">
> >        <td class="fname">Gavin</td>
> >        <td class="lname">Wick</td>
> >        <td class="edit"><a href="#">edit</a></td>
> >    <td class="delete"><a href="#">delete</a></td>
> > </tr>
> > <tr id="uid_3">
> >        <td class="fname">Sharon</td>
> >        <td class="lname">Tower</td>
> >        <td class="edit"><a href="#">edit</a></td>
> >    <td class="delete"><a href="#">delete</a></td>
> > </tr>
> > </tbody>
> > </table>
> >  <div id="del">
> > <form action="http://localhost/test/form-dialog.php"; method="post"
> > id="del-member" name="del-member">
> >        <p class="ui-state-error"><span class="ui-icon ui-icon-alert"
> > style="float:left; margin:0 7px 0 0;"></span> Please select the reason
> > for ending the membership of <span class="name"></span> !</p>
> >    <span>Reason: </span>
> >    <select name="reason">
> >        <option value="None">None</option>
> >        <option value="Retired">Retired</option>
> >    </select>
> >    <input type="hidden" id="profile_id" name="profile_id" value="" />
> > </form>
> > </div>
> >  <div id="edit">
> > <form action="http://localhost/test/form-dialog.php"; method="post"
> > id="edit-member" name="edit-member">
> > </form>
> > </div>
> >
> > </body>
> > </html>
>
> --
>
> 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]<jquery-ui%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jquery-ui?hl=en.
>
>
>

--

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