jquery-ui, Use dialog('open') and pass a variable to the DIALOG

Posted by nobosh on Stack Overflow See other posts from Stack Overflow or by nobosh
Published on 2010-05-22T21:45:13Z Indexed on 2010/05/22 21:50 UTC
Read the original article Hit count: 322

Filed under:
|

I have the following JS:

$('#listeditdialog').dialog('open');

Which opens the following dialog:

$('#listeditdialog').dialog({
    autoOpen: false,
    resizable: false,
    position: ['center',150],
    width: 450,
    open: function(event, ui) {
        $("#listeditdialog").load("/projects/view/tasks/ajax/?listid=" + XXXX);
    },
    close: function(event, ui) {
        $("#listeditdialog").html('<p id="loading"> </p>');
    }
});

My Question is when I use the dialog open function in another JS function, how can I pass a listID variable which I would get fom the click even bind that fired the dialog open func.

Thanks!

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about jquery-ui-dialog