How to use tabs in Dialog ?

How to use tabs in Dialog ?


Hi all , i try this but i get some troubles :
-------- HTML ---------
<button id="tabtest" class="ui-button ui-state-default ui-corner-
all">tabtest</button>
<div id="dialogtab" title="Create new user">
    <ul>
        <li><a href="#tabs-1">Nunc tincidunt</a></li>
        <li><a href="#tabs-2">Proin dolor</a></li>
        <li><a href="#tabs-3">Aenean lacinia</a></li>
    </ul>
    <div id="tabs-1">
        

p1


    </div>
    <div id="tabs-2">
        

p1


    </div>
    <div id="tabs-3">
        

p1


        

p2


</div>
</div>
-------- JS ---------
    $("#dialogtab").dialog({
        bgiframe: true,
        autoOpen: false,
        height: 500,
        width: 500,
        modal: true,
        buttons: {
            Cancel: function() {
                $(this).dialog('close');
            }
        },
        close: function() {
            allFields.val('').removeClass('ui-state-error');
        }
    });
    $("#dialogtab").tabs();
    $('#tabtest').click(function() {
        $('#dialogtab').dialog('open');
    })
It seems that tabs get strange events there...
The aim is to get tabs in a modal window.
Hope you could help.
Tx all for your project, it was cool to do with it
Regards
marine