[jQuery] Re: BlockUI question

2007-09-21 Thread Gordon

Thanks for looking into that Mike, I appreciate it.

On Sep 21, 12:29 am, Mike Alsup [EMAIL PROTECTED] wrote:
  I've faced the same frustration. Why not just hide the displayed div
  rather than removing it from the DOM? This would be my preference as
  well. Perhaps as an option.

 Yeah, I should refactor it to behave that way; that makes good sense.  Sorry
 for the frustration!

  Does the example create a memory leak pattern via the circular
  reference? I haven't checked it with drip, but it looks to me like a
  leak scenario.

 Well, not exactly, but it does put the onus on you as the user to clean up
 your cache before page unload.  Good point though, I hadn't considered that.

 @seedy:  Your technique solves the must cache problem but you end up
 accumulating a lot of noise in the DOM because the blocking elements are
 never removed (but they're created every time).

 Mike



[jQuery] Re: BlockUI question

2007-09-21 Thread Mike Alsup
Set all your cache vars to null.

$(window).unload(function() {
myCacheVar = null;
});

Mike


On 9/20/07, Jack Killpatrick [EMAIL PROTECTED] wrote:

  Mike,

 Would you mind elaborating on this ?

 Well, not exactly, but it does put the onus on you as the user to clean
 up your cache before page unload.

 What should I do to clean up the cache before page unload? I use BlockUI
 for a bunch of things, so am curious.

 Thanks,
 Jack

 Mike Alsup wrote:

  I've faced the same frustration. Why not just hide the displayed div
  rather than removing it from the DOM? This would be my preference as
  well. Perhaps as an option.


 Yeah, I should refactor it to behave that way; that makes good sense.
 Sorry for the frustration!


  Does the example create a memory leak pattern via the circular
  reference? I haven't checked it with drip, but it looks to me like a
  leak scenario.


  Well, not exactly, but it does put the onus on you as the user to clean
 up your cache before page unload.  Good point though, I hadn't considered
 that.

 @seedy:  Your technique solves the must cache problem but you end up
 accumulating a lot of noise in the DOM because the blocking elements are
 never removed (but they're created every time).

 Mike





[jQuery] Re: BlockUI question

2007-09-21 Thread Jack Killpatrick

Thanks, Mike!

BTW, love this plugin, and have found cycle, form and rounded corners 
plugins to be awesome, too! (just thought I'd toss that in since I have 
your attentiongreat stuff ;-)


- Jack

Mike Alsup wrote:

Set all your cache vars to null.

$(window).unload(function() {
myCacheVar = null;
});

Mike


On 9/20/07, *Jack Killpatrick*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:


Mike,

Would you mind elaborating on this ?

Well, not exactly, but it does put the onus on you as the user to
clean up your cache before page unload.

What should I do to clean up the cache before page unload? I use
BlockUI for a bunch of things, so am curious.

Thanks,
Jack


Mike Alsup wrote:


I've faced the same frustration. Why not just hide the
displayed div
rather than removing it from the DOM? This would be my
preference as
well. Perhaps as an option.


Yeah, I should refactor it to behave that way; that makes good
sense.  Sorry for the frustration!
 


Does the example create a memory leak pattern via the circular
reference? I haven't checked it with drip, but it looks to me
like a
leak scenario.


Well, not exactly, but it does put the onus on you as the user to
clean up your cache before page unload.  Good point though, I
hadn't considered that.

@seedy:  Your technique solves the must cache problem but you
end up accumulating a lot of noise in the DOM because the
blocking elements are never removed (but they're created every time).

Mike







[jQuery] Re: BlockUI question

2007-09-20 Thread Mike Alsup
Hi Gordon,

No, it can't be set to display:none, but blockUI does not destroy the
message element - it simply removes it from the DOM.  If you cache it before
calling blockUI you can use the same element over and over as shown in the
last example on this page:

http://www.malsup.com/jquery/block/#page

Mike


On 9/20/07, Gordon [EMAIL PROTECTED] wrote:


 I have been using the blockUI extension for a while and am overall
 happy with it, but I do have one issue that I would like to resolve
 with it.

 As far as I can tell the blockUI extension destroys the element it is
 using to display as it's message when you unblockUI.  This isn't an
 issue for simple dialog boxes, but I have one dialog in my project
 that is computed dynamically by the javascript and it's generation can
 have a rather large overhead.  I don't want to have to regenerate this
 dialog every time I display it, so I'd rather just set it display:
 none when it's not needed instead.  Can you do this with blockUI?




[jQuery] Re: BlockUI question

2007-09-20 Thread Matt Kruse

On Sep 20, 5:52 am, Mike Alsup [EMAIL PROTECTED] wrote:
 No, it can't be set to display:none, but blockUI does not destroy the
 message element - it simply removes it from the DOM.

I've faced the same frustration. Why not just hide the displayed div
rather than removing it from the DOM? This would be my preference as
well. Perhaps as an option.

In my case, I have a number of complex pre-populated div popups on
the page, and I want to show them at different times. I'll need to
keep a global reference to each popup to avoid the div being destroyed
when unblocked.

 If you cache it before
 calling blockUI you can use the same element over and over as shown in the
 last example on this page:

Does the example create a memory leak pattern via the circular
reference? I haven't checked it with drip, but it looks to me like a
leak scenario.

Matt Kruse



[jQuery] Re: BlockUI question

2007-09-20 Thread seedy


I've pulled this off before by not using the built in $.unblockUI()
You can do:
$('.blockUI').hide() or
$('.blockUI').fade()



Gordon-35 wrote:
 
 
 I have been using the blockUI extension for a while and am overall
 happy with it, but I do have one issue that I would like to resolve
 with it.
 
 As far as I can tell the blockUI extension destroys the element it is
 using to display as it's message when you unblockUI.  This isn't an
 issue for simple dialog boxes, but I have one dialog in my project
 that is computed dynamically by the javascript and it's generation can
 have a rather large overhead.  I don't want to have to regenerate this
 dialog every time I display it, so I'd rather just set it display:
 none when it's not needed instead.  Can you do this with blockUI?
 
 
 

-- 
View this message in context: 
http://www.nabble.com/BlockUI-question-tf4486759s15494.html#a12797024
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: BlockUI question

2007-09-20 Thread Mike Alsup

 I've faced the same frustration. Why not just hide the displayed div
 rather than removing it from the DOM? This would be my preference as
 well. Perhaps as an option.


Yeah, I should refactor it to behave that way; that makes good sense.  Sorry
for the frustration!


 Does the example create a memory leak pattern via the circular
 reference? I haven't checked it with drip, but it looks to me like a
 leak scenario.


Well, not exactly, but it does put the onus on you as the user to clean up
your cache before page unload.  Good point though, I hadn't considered that.

@seedy:  Your technique solves the must cache problem but you end up
accumulating a lot of noise in the DOM because the blocking elements are
never removed (but they're created every time).

Mike


[jQuery] Re: blockUI question

2007-08-02 Thread Mike Alsup

How about using a window.confirm dialog?  :-)

I put together an example of how this can be done with blockUI:

http://malsup.com/jquery/block/nest.html

Mike


On 8/2/07, oscar esp [EMAIL PROTECTED] wrote:

 I am using blockUI like modal window, it means that I load html page
 in the blockUI message. That works fine, however I have a problem now,
 because I need to block (when I am in the modal) to show confirm
 message...

 Are there any way to block twice?




[jQuery] Re: BlockUI question

2007-05-24 Thread bdee1

yes it basically boils down to clicking a link to get a pdf.  but on
this page, the user is presented with a list of word documents that
are stored as binary data in a database.  the user chooses the word
documents they want and then when they click the link, their selected
word files are converted to pdf and then appended into the same PDF
file.  so if they choose one or 2 items it doesnt take very long but
if they choose 30-40 items it takes a while and therefore I need the
UI blocked with a Please Wait message.

with that said - we do not use AJAX for this, we just use a standard
navigation link.

for now what i did is include a cancel link in the blockUI message
which uses javascript to refresh the page and therefore unblock the
UI, but it would be much nicer if the UI could just unblock when the
UI automatically when the PDF file is generated.


On May 23, 3:59 pm, Mike Alsup [EMAIL PROTECTED] wrote:
 I'm not sure I followed all that.  Does this boil down to clicking a
 link to get a PDF?  If so, that seems like an odd case for blocking
 the UI.  Is the request made using ajax or normal link navigation?

 Mike



  I am using the BlockUI plugin on one of may pages.  it works well for
  blocking the UI, but i am having trouble gettign it to unblock the UI.

  on this page, i click a hyperlink which calls a page that generates a
  PDF file.  this page calls another page which sends the PDF file to
  the browser so they get the do you want to open or save the PDF
  dialog.

  the problem is that i dont knwo where i am supposed to put the
  $.unblockUI; so that the page will unblock when the PDF is spit back
  to the browser.- Hide quoted text -

 - Show quoted text -



[jQuery] Re: BlockUI question

2007-05-23 Thread Mike Alsup


I'm not sure I followed all that.  Does this boil down to clicking a
link to get a PDF?  If so, that seems like an odd case for blocking
the UI.  Is the request made using ajax or normal link navigation?

Mike


I am using the BlockUI plugin on one of may pages.  it works well for
blocking the UI, but i am having trouble gettign it to unblock the UI.

on this page, i click a hyperlink which calls a page that generates a
PDF file.  this page calls another page which sends the PDF file to
the browser so they get the do you want to open or save the PDF
dialog.

the problem is that i dont knwo where i am supposed to put the
$.unblockUI; so that the page will unblock when the PDF is spit back
to the browser.