admin管理员组

文章数量:1196136

I tried different ways to do this but i cant get it work. this is the code:

    $.ui.dialog.defaults.bgiframe = true;
$(function() {
    $("#category_edit_dialog").dialog({
        width: 960,
        hide: 'slide',
        position: 'top',
        show: 'slide',
        close: function(event, ui) { redirect here? how? }
    });
    });
});

Thanks dekomote for helping me. At his advice i solved the problem: here is the full working code:

 $.ui.dialog.defaults.bgiframe = true;
$(function() {
    $("#category_edit_dialog").dialog({
        width: 960,
        hide: 'slide',
        position: 'top',
        show: 'slide',
        close: function(event, ui) { location.href = 'url here' }
    });
});

I tried different ways to do this but i cant get it work. this is the code:

    $.ui.dialog.defaults.bgiframe = true;
$(function() {
    $("#category_edit_dialog").dialog({
        width: 960,
        hide: 'slide',
        position: 'top',
        show: 'slide',
        close: function(event, ui) { redirect here? how? }
    });
    });
});

Thanks dekomote for helping me. At his advice i solved the problem: here is the full working code:

 $.ui.dialog.defaults.bgiframe = true;
$(function() {
    $("#category_edit_dialog").dialog({
        width: 960,
        hide: 'slide',
        position: 'top',
        show: 'slide',
        close: function(event, ui) { location.href = 'url here' }
    });
});
Share Improve this question edited May 6, 2014 at 3:00 Harry Johnston 36.3k6 gold badges72 silver badges165 bronze badges asked Sep 19, 2010 at 11:10 ciprianciprian 4432 gold badges8 silver badges23 bronze badges 1
  • 3 did you try location.href = 'where you want to redirect' – dekomote Commented Sep 19, 2010 at 11:16
Add a comment  | 

1 Answer 1

Reset to default 22
    $.ui.dialog.defaults.bgiframe = true;
    $(function() {
        $("#category_edit_dialog").dialog({
            width: 960,
            hide: 'slide',
            position: 'top',
            show: 'slide',
            close: function(event, ui) { window.location.href = "page.html"; }
        });
        });
    });

where "page.html" is the page you wish to redirect to on close

本文标签: javascriptRedirect jquery ui dialog on closeStack Overflow