Welcome Guest, Not a member yet? Register   Sign In
Forum Redirect Pages - How Do They Do It?
#4

[eluser]Chad Fulton[/eluser]
I don't know of anything in particular which gives a demonstration or tutorial of this, but it shouldn't be too hard to pull off; it's a pretty simple application of AJAX in my opinion.

Of course, it requires that your users support Javascript, which isn't always ideal (I think that an output buffering solution would also likely require javascript, however, since when the data is eventually fetched, you'd want some way to clear the HTML which had been pushed to the browser with the "Please Wait" message, and that means Javascript).

I'm not sure what your page's flow is, so I'll make one up and hopefully it'll be helpful:

1. User initiates the long data fetch (clicks a button, or does a search, or whatever).
2. jQuery intercepts the button's default action and prevents it.
3. jQuery puts a little spinning icon and a "Please wait while your query is performed" message up on the page.
4. jQuery initiates an AJAX request with the server, to perform the request.
5. The spinning icon continues, and the "Please wait..." message remains on the screen while the server processes the query.
6. Here you have two options, depending on how you're doing this:
a) The server caches / stores the data in some way, and sends the appropriate URL back to jQuery, which redirects the page to that URL (i.e. the browser's URL changes)
b) The server returns the data, and jQuery puts it up on the current page (i.e. no page refresh)

Does this give you an idea?
If you haven't done anything with AJAX yet, there are a bunch of good tutorials on using jQuery to do it, and I have to say that jQuery makes it pretty simple.


Messages In This Thread
Forum Redirect Pages - How Do They Do It? - by El Forum - 01-25-2010, 01:39 AM
Forum Redirect Pages - How Do They Do It? - by El Forum - 01-25-2010, 03:23 AM
Forum Redirect Pages - How Do They Do It? - by El Forum - 01-26-2010, 12:51 PM
Forum Redirect Pages - How Do They Do It? - by El Forum - 01-26-2010, 02:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB