[Pro] Fade entire page

How can I fade the first page to the second page or should I use different software?

Joe


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Unless you are making a “single-page-application” site, where you don’t actually request new pages when you click on links, but rather send JavaScript commands to a display engine, you can’t do this in Freeway or any other Web development tool.

If you are going to do this, you’d use a library like Backbone.js, and the technique works a bit like this:

There’s an outer framework page which loads the JavaScript libraries and your application code. There’s also a default “page” that loads in the middle of this page. (This “page” is really a page fragment – it’s just the HTML needed for that section of the page, not the surrounding tags that make it a complete page. If you were to load it into a browser, it might display, but it would do so oddly and without any style, since the browser would have to infer those elements from its defaults.)

When you click on a link in the combined page, the JavaScript you wrote would intercept that link request, modify it into an Ajax request, send that out to the server in a back channel (the page would not reload), load the requested fragment into a hidden DIV directly behind the visible fragment, then fade out the visible fragment so the new “page” appears.

Pages like this are a lot of work, and require a lot of expensive and esoteric engineering to overcome the natural mis-match they have with normal browsers. The reason why anyone goes to all this trouble is two-fold: they want their page to look and act like a desktop application, with the least possible lag between click here and action there, and they have so much JavaScript that has to be loaded on every page that they only want to do that once per user session. So while they have to do so very much work to make this go, it’s worthwhile to them because it then doesn’t waste as much of the visitor’s time.

If you’re going to do this, and it’s only for the visual effect, consider whether this is a good use of your time. The visual effect is a by-product of the underlying page-turn mechanism. It’s actually the easy part. The rest of it is so darned hard that you’ll be kicking yourself for trying.

Walter

On Sep 16, 2011, at 1:55 AM, Joe wrote:

How can I fade the first page to the second page or should I use different software?

Joe


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options