HTML, DIVs, CSS and Content
Discussion
ok,
After taking the advice of some people here I'm reworking my site to purely use CSS etc.
So having ditched the frames, I have done a layout which has a top-bar div accross the top of the page.
Down the left hand side I have a Div with my menu in it, then the rest of the screen is taken up by a DIV where I want the contents to go.
How (in Javascript or what ever) can I processa click in the menu and get the browser to fetch some page data and load it into the 'Content' DIV.
Am I completely barking up the wrong tree here - does the browser need to refresh the entire page info - a bit like a target = _Top, when what I'd like to do is a target = content-div thus preventing a full page reload and then having to track the state of the expanding men.
some pointers would be cool.
thanks guys.
After taking the advice of some people here I'm reworking my site to purely use CSS etc.
So having ditched the frames, I have done a layout which has a top-bar div accross the top of the page.
Down the left hand side I have a Div with my menu in it, then the rest of the screen is taken up by a DIV where I want the contents to go.
How (in Javascript or what ever) can I processa click in the menu and get the browser to fetch some page data and load it into the 'Content' DIV.
Am I completely barking up the wrong tree here - does the browser need to refresh the entire page info - a bit like a target = _Top, when what I'd like to do is a target = content-div thus preventing a full page reload and then having to track the state of the expanding men.
some pointers would be cool.
thanks guys.
You could do it with an IFrame but that's not ideal, since it sort of defeats the point of dropping frames in the first place...
Aside from that, I wouldn't know other than a whole page reload.
The beauty of using CSS is that your HTML code is so light page reloads should be lightning fast anyway.
Aside from that, I wouldn't know other than a whole page reload.
The beauty of using CSS is that your HTML code is so light page reloads should be lightning fast anyway.
PetrolTed said:
You're barking up the wrong tree.
Load a new page but share the menu code via an import.
Would that import be handled in asp or php etc...
At the moment eeverything is very static, I just have a bunch of pages, what I don't want to do is end up having a stock template that is used for all my pages and then find later I want to change something and have to go back and edit every page. (If you get my drif/concern).
I suppose I could go the whole hog and do it really properly by having all my page content in stub files, then use php to import the relevent page accosing to a menu clikc passed back to the server.
This was one of the reasons I initally went with Framse - it does appear to me that a frames based approach keeps the page data files simple to maintain.
cheers
GreenV8S said:
PetrolTed said:
share the menu code via an import.
Do you just mean including a common menu implementation (HTML and/or script) in both pages, or is this some devious mechanism to have the two pages share state information?
A lot of servers support Server Side Includes. Google should give you an example.
You can do what you are talking about via AJAX if you really want to, but this is not a great idea as it will break the back button...
Couple of good book recommendations for ya!
HTML Utopia: Designing without tables using CSS by Dan Shafer
and
The Zen of CSS Design by Dave Shea and Molly D Holzschlag
>> Edited by judas on Tuesday 4th October 14:50
HTML Utopia: Designing without tables using CSS by Dan Shafer
and
The Zen of CSS Design by Dave Shea and Molly D Holzschlag
>> Edited by judas on Tuesday 4th October 14:50
PetrolTed said:
You can do it with htmlContent - that's how I did the Google maps in the classifieds. It's a sledgehammer to crack a nut though.
Isn't that a server side operator hence it precludes being able to modify the location on the fly at the client end? I think I see what TheEx is getting at, when he uses frames, because one is used for the display of dynamic information, the one that he doesn't refresh/reload maintains context for it's menus etc. I've yet to see a coherent reason as to why frames are so bad.

TeamD said:
I've yet to see a coherent reason as to why frames are so bad.
Two words: search engines. As strange as this seems, they still can't cope well with frames-based sites. If search engine placement is not an issue then use them! Still, doing it all server-side is a much better solution in the long run.
judas said:
TeamD said:
I've yet to see a coherent reason as to why frames are so bad.
Two words: search engines. As strange as this seems, they still can't cope well with frames-based sites. If search engine placement is not an issue then use them! Still, doing it all server-side is a much better solution in the long run.
Bookmarks! If you have a framed site and someone navigates through lots of page links to get to a page they like and bookmarks the page the bookmark the frameset which when they return to the bookmark shows the first page, not the result of all their navigating.
judas said:
Two words: search engines. As strange as this seems, they still can't cope well with frames-based sites. If search engine placement is not an issue then use them!
I've never really subscribed to the modifying my code because someone else can't be bothered to fix theirs approach. If it's an issue and I were responsible for the development of the webcrawler code etc then I'd be fixing it at source rather than expecting the world to change because I couldn't be arsed.
judas said:
Still, doing it all server-side is a much better solution in the long run.
Yeah but, no but...There are just some things that you can't do server side, for example, if you're just using IE as a rendering engine, the only bits of the display that you want to refresh on a regular basis are those that are likely to change.
TeamD said:
I've never really subscribed to the modifying my code because someone else can't be bothered to fix theirs approach. If it's an issue and I were responsible for the development of the webcrawler code etc then I'd be fixing it at source rather than expecting the world to change because I couldn't be arsed.
Have to agree with you here - to a point. But try explaining to clients why they're on page 3485323 of a Google search because you used frames to layout their site - always good for a laugh

judas said:
Have to agree with you here - to a point. But try explaining to clients why they're on page 3485323 of a Google search because you used frames to layout their site - always good for a laugh
Luckily I'm not it that game.
Most of my customers don't care where Google ranks the info I generate, the important thing is that it exists and is correct.Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff



