|
|
|
changing content section without reloading entire page |
| message from DJ on 16 Jul 2004 |
Hi All
I suspect there is a reasonably straight forward answer to this question,
but I am yet to stumble across it. I wish to build a page, which for the
sake of the question can be assumed to have a 200 pixel border all the way
around the edges (this border is actually the logo, header, menu bar, footer
etc).
Within certain sections of the site, this border area will remain unchanged,
but the content within the border will change (i.e., depending on which menu
button you press, the content in the middle changes, but the available menu
buttons, header etc do not).
How do i set up the site so that the border area is not reloaded with each
click.
i.e., i don't want to reload the menu bar, header etc, just the inside
content
I suspect the answer involves using layers, but I'm not entirely sure how...
Is it a matter of setting up N layers and then setting specific buttons to
make one particular layer visible and the rest invisible?
If so, can I do this without Javascript?
|
| ~Flash~ replied to DJ on 15 Jul 2004 |
Hey DJ... I'm afraid to answer your question since Murray seems to be
I understand what your trying to do.
The easiest way by far would be to use frames or an iframe but thats a topic I
don't want anything to do with...
I recently saw a product at
http://www.projectseven.com/viewer/index.asp?demo=geewizz which are like a mini
window in your browser and you can flip through content through links around
the scroller and even scroll up and down I thought you may be interested in it
espesialy since you don't have to load the whole page again it's all one page
(although that dosn't giove search engines much if you make your whole site on
one page)
Hope that helps... although I think it's possible to do something like this
through a applet but I'm not 100% sure so there aren't any guarantees.
Flash
|
| darrel replied to ~Flash~ on 15 Jul 2004 |
If we could only talk you into using the newsreader, flash, you'd find that
there are responses (hint, hint, wink, wink... ;o)
You can do pretty much anything with a Java applet, as Java is a fully
functioning programming language. However, Java applets are rarely (if ever)
the best way to distribute text or image based content online.
-Darrel
|
| darrel replied to DJ on 15 Jul 2004 |
Why? This is how the web actually works, mind you. It's a universe of pages
that are linked to each other.
Well, you have. Don't worry about the rest of the page reloading. That's
just how the web works.
If you really don't want this to happen, you can resort to using frames,
iframes, or hidden layers. But all of those solutions will open up a whole
other can of worms in terms of accessibility, usability and maintainability.
-Darrel
|
| Joe Makowiec replied to DJ on 15 Jul 2004 |
<bunch of snippage>
I gather you want to have a fixed nav, and changable content on a lot of
the page? Some items to consider:
- HTML, unless you're way overdoing it, is light - it doesn't take up
much space, and it doesn't take long to download it.
- Images, especially if you're not careful, add up quickly
- Images, external css files, external javascript files are cached by a
browser, so if multiple pages on your site call, say, header.jpg, then
the browser will only donwload it once.
- Half or better of the world is still on a 56K dialup. This varies by
location, but figure that at least half of the people viewing your page
are on dialup.
- It takes about 10 seconds to download 40K on a 56K dialup.
- If you haven't presented significant content within 10 seconds, people
will get itchy mouse fingers.
- Total page weight is defined as the sum of the size of HTML files,
included image files, linked CSS and javascript files.
Given that information:
If you want to have a series of pages with the same appearance, create
them using either templates or server side includes (SSIs) to create the
stock content. Which to use? To some extent, it depends on how many
pages you have. I just switched a site with about 80 pages from
templates to SSIs because updating the templates was getting to be a
chore.
If you go this route, since most of the stuff on a page will load with
the first page viewed, page loading on other pages should be snappy, even
though they're new pages.
If that doesn't answer your question, what are you trying to do? There
are a whole bunch of techniques available, but we have to know before we
can recommend one.
|
|