Adam, I did not see an autoOpen: false on the first dialog call. It
looks like you are calling it twice. I would try just doing it once
as part of the load callback like this:
$('#dialog').load("ajax-lookup.php?ticketid="+id, function(){
$(this).dialog({
modal:true,
width: 800,
minWidth:800,
title: 'Ticket Details for '+nm
});
});
You could also just create the DOM element for the dialog on the fly.
So instead of:
$('#dialog').load...
You could do:
$('<div></div>').load...
Hth,
Dave
On Feb 16, 8:28 pm, Adam S <[email protected]> wrote:
> I am trying to write an app that has a table, and upon clicking each
> row, it needs to load a dialog box that will be loaded via AJAX. The
> challenge is, I need to pass the variables as I'm echo'ing the HTML.
> This is how I've tried to do it with a funky result.
>
> First off, this is a typical row of the HTML:
>
> <tr>
> <td></td><td><a name='1091234825'
> href='#void' onclick="jqticket('1091234825','Adam
> S');">Adam S</a></td>
> <td class="priority3">Normal</td>
> <td class="date">6 hours ago</td>
> <td> </td>
> <td class="assignment">
> <b><a href="?groupid=1">IT</a></
> b> > Unassigned
> </td>
> </tr>
>
> On document.ready, i call ('#dialog').dialog() to create the dialog
> box. This is the function called from above:
>
> function jqticket(id,nm) {
> $('#dialog').dialog({ modal:true, width: 800, minWidth:800,
> title: 'Ticket Details for '+nm
>
> }).load("ajax-lookup.php?ticketid="+id).dialog('open'); }
>
> I had to call the dialog() method twice, because it wouldn't work
> otherwise. My problem is such: the entire table is encased in jQuery
> UI's tabs() function, for one, which I suspect i causing a problem.
> Secondly, the *first* box will pop up properly, but aligned to the
> bottom of the screen. The second time I click, it ignores my
> arguments - the box is narrow, aligned to the bottom, and non-modal.
> The third one is right, aligned properly center screen, modal. The
> fourth is like the second, the fifth like the third, etc. I cannot
> figure out what the heck is going on. Cannot I not have dialog()
> within tabs()? Can anyone help with this? I've been playing with it
> for hours.
>
> Thanks,
>
> Adam
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---