Форум администраторов игровых серверов

Форум администраторов игровых серверов (https://forum.zone-game.info/TT.php)
-   PHP (https://forum.zone-game.info/forumdisplay.php?f=125)
-   -   И снова вопрос... (https://forum.zone-game.info/showthread.php?t=10249)

Aquanox 26.09.2010 11:23

Re: И снова вопрос...
 
ну примерно так.
Код HTML:


<script type="text/javascript">
 $(document).ready(function() {
        $('.edit-trigger').click(funciton() {
            var id = parseInt($(this).attr('id').replace(/item_/,''));
           
            $.ajax({
                url:  "/myapp/mycontroller/editForm/" + id,
                success: function(result) {
                    // result = форма редактирования
                    $('#editor_' + id).html(result);
                    $('#editor_' + id).dialog({
                        closeOnEscape: true
                    });
                }
            });
        });
  });
</script>





<div class="row">

<button id="item_5" class="edit-trigger">Edit</button>
<div class="editor_5"  style="display:none;"></div>

</div>



форма редактирования
Код HTML:

<script type="text/javascript">
  $(document).ready(fucntion() {
        // jquery.validate
        //$("#edit_form_5").validate({});
       
        // jquery.form
        //$("#edit_form_5").ajaxSubmit({
        //    success: function() {
        //          $('#editor_5').close();
        //    }
        //});
  });
</script>

<form id="edit_form_5">
    ....
</form>



Текущее время: 02:31. Часовой пояс GMT +3.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot