Click to See Complete Forum and Search --> : How to display pages
Mimorkeris
02-02-2005, 11:56 AM
Hi guys,
If I was to use frames on my page I could load another page into that frame and then at the click of a button load a different page into it.
Is there anyway of doing this using JS or some other method a novice might grasp?
I don't want to have a Div for each of the pages content and show & hide them, as this would mean loading every page's content when anybody first visited the site.
Any suggestions or pointers would be appreciated.
Regards Mimorkeris
I'm not really clear on what your asking - is your post asking about how to display a linked page into one portion of a frameset, without the rest of it disappearing?
If so, just name the sections of your frameset with name="" in the <frameset> tag, then in the link tag, indicate the target frame you want it to appear in.
<a href="http://www.location.htm" target="frame1">Link</a>
Good Luck -
Mimorkeris
02-02-2005, 12:53 PM
No, I'm asking that.
What I'm looking for is a way of changing the text/pictures etc which are being displayed in the content section of a page.
Most pages have a header, content and footer section. I just want change the contents without keep loading the rest, as would happen if you loaded a new page each time.
Mimorkeris
02-02-2005, 12:56 PM
Further to last post.
I do not want to use frames at all.
ray326
02-02-2005, 01:56 PM
The only other alternative to frames is to use page templating driven by some server-side support like ASP, PHP, CGI or maybe (but probably not) server side includes.
Mimorkeris
02-02-2005, 03:38 PM
Thanks Ray, since I beleive ASP is not a million miles from VB I'll have a poke around in that direction.
Cheers
ray326
02-02-2005, 11:25 PM
Yes, the default scripting language for ASP is VB Script so the syntax will be familiar if you're a VB programmer.
Mimorkeris
02-03-2005, 02:30 AM
Hi Ray, Yes, for my sins I am VB programmer!
Just one other question, If your page contains a lot of image fiules, a couple of javascript files containing various functions and a CSS.file or two. When the user calls the page the get downloaded, if subsequent pages use most if not all of these files, are they used from the user's PC cache or downloaded again?
Regards Mimorkeris
ray326
02-03-2005, 11:22 AM
They should come from cache and be very quick.
Mimorkeris
02-03-2005, 12:05 PM
Thanks Ray,
So providing each new page loaded has only a small amount of new text and very little new graphic content, the hit of displaying a different page each time should be minimal?
What if I used ASP pages with a server side include for large chunks of the page.
i.e. the banner, menu and footer section will always be the same, so these could be .inc files and only the main content coded into each page.
Will I then be forcing the User to download these .inc files everytime, my understanding says yes?
Many thanks for your help on this one, it's so difficult to know which route is best in terms of performance.
The other thing of course to consider is do I need to provide a vannila HTML version for those users that don't allow JS?
Regards Mimorkeris
ray326
02-03-2005, 06:56 PM
The HTML for a page will not be cached unless the server tells the browser it hasn't changed. That's not a trivial job for dynamically generated pages so don't count on it. But one of the up sides of modern page design is that it minimizes the HTML in a page.
Images, external style sheets and external Javascript files will be cached.
Included page fragments assembled by the ASP processor will always be downloaded because they actually become part of the total page the browser sees.
Don't try to separate JS-disabled browsers; just make sure the site can be used without it. That comes down to to aspects; navigation and form validation.
Mimorkeris
02-04-2005, 02:47 AM
Thanks once again Ray.
I feel I'm beginning to see light at the end of tunnel!
I find it very frustrating that I can't step through the code and see whats going on as you can in VB, so it's very helpful to be able to get input from others with more experience.
Regards Mimorkeris