Thanks, but I couldn't get that to work, I can't get the dialog to position where I want it to go ot to take the correct size and the result just looks like a total mess.
On Sep 4, 2:24 pm, Quayfee <[EMAIL PROTECTED]> wrote: > Hi Gordon, > > I don't know if it's of any use to you, but I hit a similar issue > creating blockUI popups with external files as thier source. > > I ended up with a solution that sounds simliar to what you're doing, I > create the div at the end of the page [$('body').append('<div > id="dialog"></div>')], then populate it (in my case from the external > file), then set a variable with the jQuery object for that div [var > dialogDiv = $('#dialog');], then use that object as the target for the > call to $.blockUI. > > Here's my final working function: > > function setDialog(srcFile) { > $('body').append('<div id="dialog"></div>'); > $('#dialog').load('_dialogs/'+srcFile,'',function(){ > $.extend($.blockUI.defaults.overlayCSS, { backgroundColor: > '#333333', opacity: '0.5' }); > var dialogDiv = $('#dialog'); > $.blockUI(dialogDiv); > }); > > }; > > I then have another function that destroys the generated code when a > user cilcks on a link or button in the external dialog files. using > $.unblockUI() forllowed by $('#dialog').remove(); > > I also found that I had to be very careful about the z-index of > elements used for blockUI and ended up setting them very high in the > css file just to make sure :o) > > I'm still pretty new to jQuery (only a week and a 1/2 on it so far) > but this might help... > > Cheers > > Keith