ok, I've thrown something together in the end. don't know if it is the
best method but it works for the time being. maybe someone else might
find it useful, or refine it.

1. search terms entered, search button clicked by user
2. search terms recorded to session
3. "Currently Processing" view output to users screen which includes a
hidden iframe
4. within iframe the processing action is called
5. once this action has completed it's work it outputs a simple
javascript call to reload the top frame
6. top frame outputs the returned search results.

I've also put a refresh on the top frame after a sufficient number of
seconds as a fail safe to the javascript call.

until i spend some quality time with ajax, this is what i'm going to
run with for now.

thanks again for the help fellas, much appreciated :)

cheers,
mikee

On 30/10/06, Mikee Freedom <[EMAIL PROTECTED]> wrote:
> Hey AD7six,
>
> Thanks for your response, I would love to play around with Ajax but
> for the moment I haven't the time to get my head around it. I would
> like it to work in a non-JS environment anyway so am looking to start
> there and I will ajaxify later on.
>
> So, based on your non-JS answer:
>
> > --> If js is disabled, after rendering the results page for the first
> > time, process and cache the results page
> > --> If js is disabled after a sufficient number of seconds redirect to
> > the same url and display the results
>
> The part I'm not quite clear on, is how do I render the results page
> the first time (prior to processing) and then go about processing the
> query and the second phase results page??
>
> I know that might seem like a completely idiotic question but...
>
> At the moment, I store the request in the session, render the action,
> and then carry on with the processing after the render call. My
> question is, will this first results page display on the user's screen
> immediately and then the controller carry on with the processing
> behind the scenes. or will it not appear until the processing is
> complete? using $controller->render() that is.
>
> or am i being daft?
>
> thanks again mate,
> mikee
>
> On 30/10/06, AD7six <[EMAIL PROTECTED]> wrote:
> >
> > Hi Mikee,
> >
> > Here's one approach:
> > User submits form via ajax
> > using Js you display a "processing" message
> > Controller action processes the form and redirects* the user to the url
> >
> > Here's another:
> > User submits the form normally
> > User is redirected to the url for their search results
> > --> If js is disabled, after rendering the results page for the first
> > time, process and cache the results page
> > --> If js is disabled after a sufficient number of seconds redirect to
> > the same url and display the results
> >
> > --> If js is enabled on loading make an ajax request to process and
> > cache the results page - updating the contents of your page.
> >
> > The results in all cases would be pretty similar, for the latter you
> > would need to sniff a little to know if js is enabled (could simply use
> > js to change a value in the submitted form).
> >
> > * To 'redirect' from an ajax call you would use requestAction.
> >
> > HTH,
> >
> > AD7six
> > Please note:
> > The manual/bakery is a good place to start any quest for info.
> > The cake search (at the time of writing) erroneously reports less/no
> > results for the google group.
> > The wiki may contain incorrect info - read at your own risk (it's
> > mainly user submitted) :)
> > You may get your answer quicker by asking on the IRC Channel (you can
> > access it with just a browser here: http://irc.cakephp.org).
> >
> > On Oct 30, 6:18 am, "Mikee Freedom" <[EMAIL PROTECTED]> wrote:
> > > has anyone done anything similar to this in Cake before? or any other
> > > application?
> > >
> > > If the question is seen to be more of a generic one then fair enough.
> > > but if anyone knew of a method within CakePHP to display a processing
> > > screen while PHP performs a function behind the scenes it would be
> > > much appreciated.
> > >
> > > even a nudge in the right direction...
> > >
> > > thanks,
> > > mikee
> > >
> > > On 29/10/06, Mikee Freedom <[EMAIL PROTECTED]> wrote:
> > >
> > > > hey bingo,
> > >
> > > > had a look at it and it was useful in a way. however it seems the
> > > > multi step was more in processing the data rather than any kind of
> > > > display to the user. i've got a handle on how i am searching for the
> > > > data and it is using the very handy findAll method with some creative
> > > > use of bindModel, unbindModel and conditions.
> > >
> > > > however, when my DB grows i think the request to the DB could take
> > > > some time, and then i process the results at the controller /
> > > > component level which will again soak up milliseconds.
> > >
> > > > what i would like is the ability to display an intermediate screen
> > > > while this processing goes on behind the scenes. i didn't really see
> > > > mention of such functionality in that discussion.
> > >
> > > > does this make sense?
> > >
> > > > thanks for your help on this one.
> > >
> > > > cheers,
> > > > mikee
> > >
> > > > On 29/10/06, bingo <[EMAIL PROTECTED]> wrote:
> > >
> > > > > hi Mikee,
> > >
> > > > > read this post...this might give you some ideas
> > > > >http://groups.google.com/group/cake-php/browse_thread/thread/c33b7864...
> > >
> > > > > Cheers
> > > > > bingo
> >
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to