frames alternative for refreshing only part of page?

J

Jules

I haven't done any serious HTML coding for a few years, so am a little
behind... :)

I've put together some php code for displaying a Windows Explorer-like
tree control within a web browser; what I want to do is have the tree
displayed in a left-hand panel and for content to come up in the right
hand panel when an item within the tree is clicked on.

Obviously I don't want to have to refresh the tree every time I load new
content in the right-hand content display panel, as that's just wasteful.

It's the sort of thing that frames would lend themselves to; two frames
and the links for items in the tree control have a target of the right
hand frame.

Out of interest though, what are the alternatives that don't use frames,
but also don't require a total page refresh when something is clicked on?
(preferably with pointers to examples! :)

Due to the nature of the tree code I'm using, target browsers are a
minimum of Netscape 6, Opera 6, IE4, and presumably Firefox (although I
haven't tried my tree code in this yet). Doubtless plenty of others too,
and of course newer browser releases should work.

cheers,

Jules
 
K

Karl Groves

Jules said:
I haven't done any serious HTML coding for a few years, so am a little
behind... :)

You're also a little behind in netiquette.
This question is asked at least once a week.
Please respect the regular posters of the group by having the courtesy of
searching the group's archives before asking for help.

-Karl
 
J

Jules

You're also a little behind in netiquette.
This question is asked at least once a week.
Please respect the regular posters of the group by having the courtesy of
searching the group's archives before asking for help.

Already did that before posting. But having waded through hundreds of
posts on the topic of frames in general and not found a useful answer to
what I'm specifically trying to do, I thought I'd ask the advice of the
(far more knowledgable) readers of the group, figuring that someone
would be polite enough to give a good reply.

Sorry for your waste of bandwidth in feeling the need to reply to my waste
of bandwidth :)

seeya

Jules
 
S

Sam Hughes

Out of interest though, what are the alternatives that don't use
frames, but also don't require a total page refresh when something is
clicked on? (preferably with pointers to examples! :)

Magic. Or, an external javascript could write the entire tree (but this is
a stupid idea -- hopefully your page will be usable with javascript turned
off).

You could also use frames, but they have megagrams of issues.

Compared to the size of any images that turn up on your site, reloading the
text probably won't be the main problem when it comes to bandwidth.
 
I

Isofarro

Jules said:
I've put together some php code for displaying a Windows Explorer-like
tree control within a web browser; what I want to do is have the tree
displayed in a left-hand panel and for content to come up in the right
hand panel when an item within the tree is clicked on.

A tree ==> nested list ==> typical left hand menu of a website.
Obviously I don't want to have to refresh the tree every time I load new
content in the right-hand content display panel, as that's just wasteful.

Its probably wasteful if you are listing a couple of hundred items in the
left hand menu. But then that's also not good HCI.
 
T

Toby Inkster

Jules said:
Out of interest though, what are the alternatives that don't use frames,
but also don't require a total page refresh when something is clicked on?
(preferably with pointers to examples! :)

<iframe> and <object> would do the job, though neither are supported as
widely as frames.

Client-side scripting (lots of document.writes) will probably do what you
need as well. But abandon all hope ye who pass through those particular
gates!

If the directory tree isn't very big, then just keep everything on the
same page and forget about it. If it's more than a few KB though, go with
frames -- they are probably the best solution for what you're doing. (Even
though they are *evil* in general!)

I am part-way through writing a guide on implementing non-evil frames.
Some of the information there may be relevant to you, other bits less so.
It's here, but I might move it later (I'll do a redirect though).
http://examples.tobyinkster.co.uk/frames/frameset.php?page=problems
Keep checking back, as I am adding bits. That might help you make your
frames only quasi-evil.
Due to the nature of the tree code I'm using, target browsers are a
minimum of Netscape 6, Opera 6, IE4, and presumably Firefox (although I
haven't tried my tree code in this yet). Doubtless plenty of others too,
and of course newer browser releases should work.

I bet you could target Opera 3.6, Safari and Konqueror 3.x for only a tiny
bit more effort. And it will make you feel a whole lot better!

Useful tip: in Opera 7.x, you can go to "Preferences" -> "Page Style" and
entirely disable frames support. This is a great way of testing your
framed pages in a non-frames browser and making sure that you've provided
some good alternative <noframes> stuff.
 
R

Robert Frost-Bridges

Jules said:
I haven't done any serious HTML coding for a few years, so am a little
behind... :)

I've put together some php code for displaying a Windows Explorer-like
tree control within a web browser; what I want to do is have the tree
displayed in a left-hand panel and for content to come up in the right
hand panel when an item within the tree is clicked on.

Have a look at the recent 'click on thumbnail' thread and Toby Inkster's
'butterflies' or 'numbers' pages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top