0

Here's the thing

I have this master page, and in one of its slave pages there's a couple of Excel report generators, which, when retrieving the data, they take quite an awefull time because of the ammount of the data.

Well, i'm using a simplemodal windows to show a little gif to keep the user entertained. The thing is, i want this modal to close once its done doing the work

I can close it with the ESC key, but i want it to close by itself once its done working. I already tried with this code

SimpleModal breaks ASP.Net Postbacks

but it didnt worked, maybe its cuz i'm creating an excel file from a gridview, and its writting the scripr to another buffer.

I'm thinking on having close button on the modal once the whole thing its finished, but i'd rather have it close by itself

Any idea on how i can accomplish this will be pretty much appreciated

Community
  • 1
  • 1
CJLopez
  • 5,495
  • 2
  • 18
  • 30

4 Answers4

0

While I can't provide much help with SimpleModal, maybe you shouldn't use a modal dialog to show a loading/progress icon. I would suggest taking a look at spin.js:

http://fgnass.github.com/spin.js/

This probably makes a little more sense for your use case, and is pretty easy to use.

Good luck!

Justin Beckwith
  • 7,686
  • 1
  • 33
  • 55
  • Well, its not what i have in mind, but i'll keep this thing for future use, is quite something!!! – CJLopez Aug 31 '11 at 01:03
0

Try appending to the .NET form, this fixes some issues with jQuery's dialog so it may help.

$("#sample").modal({
    opacity:80,
    overlayCss: {backgroundColor:"#fff"}
}).parent().appendTo("form");
rick schott
  • 21,012
  • 5
  • 52
  • 81
0

On the "work is done", you can programatically close the dialog using:

$.modal.close();
Eric Martin
  • 2,841
  • 2
  • 23
  • 23
0

Well, i didnt wanted to use a popup windows, but given that to create a Excel file from a gridview needs to write the html of the gridview on the buffer and execute it, it was never reaching the part where the javascript was to be written and executed, so, no other choise than send the dataSet over a Session variable into a popup windows which generate the excel file, so having somehting like a parallel work

I had a pretty ugly issue with IE8, my save dialog wasn't appearing, it worked on IE6 and IE7, as well with opera, firefox and chrome, but IE was giving a issue. Found there's a security option which that didnt allowed the save dialog to appear. For any one having a similar issue, its on Internet option -> Security -> Custom Level... -> Downloas -> Automatic Prompting for file downloads -> Need to be "Enabled"

Any way, thanks for tha help, hope this info also helps someone else!

CJLopez
  • 5,495
  • 2
  • 18
  • 30