Ajax would only be necessary if you want a status bar that reflects accurately the progress. You can probably get by with something simpler. I would write some Javascript that is triggered on clicking the submit button that replaces the button with this graphic: http://yesmagazine.org/store/images/pleasewait.gif
Your Javascript looks like this: ?> <script language="javascript" type="text/javascript"><!-- function SubmitOrderButton(){ document.getElementById("submitmain").style.display = "none"; if (navigator.appName == "Microsoft Internet Explorer") { document.getElementById("pleasewait").innerHTML = ""; document.getElementById("pleasewait").style.display = "block"; document.getElementById("pleasewait").innerHTML = "<img src='images/ pleasewait.gif' alt='Please Wait'>"; } else { document.getElementById("pleasewait").style.display = "block"; } } //--></script> And your HTML code looks like this: <div id="submitmain" class="buttonRow forward"> <input type="submit" name="btn_submit" value="Confirm Order" class="checkout_button" /> </div> <div id="pleasewait" class="buttonRow forward" style="display:none"> <img src="/images/pleasewait.gif"><br /> Please wait while your request is being processed... </div> Cheers, Kevin Audleman On Feb 18, 2:52 pm, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: > On Wed, 2009-02-18 at 12:20 +0000, Adam Stein wrote: > > Maybe somebody can suggest how to get the functionality I'm trying to > > duplicate. I looked and can't find anything that seemed similiar. > > > I have a form with checkboxes. User selects one or more and submits the > > form. The processing currently goes like this: > > > 1) Write JavaScript to display moving progress bar > > 2) Process based on checked boxes (which in my specific example is to > > copy the specified databases into a sandbox area) > > 3) Write JavaScript to turn off progress bar > > > The database copying is short, up to about 20 seconds. Short enough to > > let the user wait, long enough that I want to indicate the computer > > hasn't frozen :-{} > > > It seems that I can only return HTML to be displayed once from a view. > > Is there a way to get the functionality described above somehow? > > It's called AJAX. You have to keep asking the server for an update and > then updating the page. > > Regards, > Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---