By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,369 Members | 1,207 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,369 IT Pros & Developers. It's quick & easy.

Another question on changing 2 frames

P: n/a
At the website http://www.htmlhelp.com/faq/html/fra...#frame-update2
I found the following:

The JavaScript-based solution uses the onClick attribute of the
link to
perform the secondary update. For example:

<a href="URL1" target="Frame1"
onClick="top.Frame2.location='URL2';">Update
frames</a>

The link will update Frame1 with URL1 normally. If the reader's
browser
supports JavaScript (and has it enabled), then Frame2 will also be
updated
(with URL2).

If I use this function, do I need to do anything else in my code to
get it to work?

Thanks,
Tammy
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Tammy wrote:
The JavaScript-based solution uses the onClick attribute of the
link to perform the secondary update. For example:

<a href="URL1" target="Frame1" onClick="top.Frame2.location='URL2';">Update
frames</a>


You must be aware that not everyone browses with JavaScript enabled.
Indeed, I often have it disabled. So, you must consider whether that is
the most effective way to do what you would like.

There are several options you should consider:

1. If it's not important that the frames change together, then provide
an additional non-JavaScript link for the user to load the secondary
content, that would normally load with the onClick.

2. Create a second frameset document that includes both files. Then
link to that document using target="_top", so it replaces the current
framset with the new one. Just don't forget to include suitable
<noframes> content for every frameset you use.

3. Stop using Frames. The cause many usability problems, especially if
not done correctly. But even if they are done correctly, they can still
cause problems, which has been discussed many times, and is all in the
archives.
http://htmlhelp.com/design/frames/whatswrong.html

There are very few sites that make good use of frames, so the chances
are that yours doesn't. You must consider whether they're really
necessary for your site.

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://SpreadFirefox.com/ Igniting the Web
Jul 23 '05 #2

P: n/a
Thank you Lachlan, for the response.

You and several other people have mentioned that I shouldn't use
frames, but no one has said what I SHOULD use in place of frames. Up
at work someone said something about using Flash, but I haven't the
first inkling on where to begin with flash (nor do I have that
software).

So please enlighten me. These pages that I'm creating are for my
family genealogy and are very important to me. Any help or
suggestions would be greatly appreciated.

Tammy

Lachlan Hunt <sp***********@gmail.com> wrote in message news:<9f******************@news-server.bigpond.net.au>...
Tammy wrote:
The JavaScript-based solution uses the onClick attribute of the
link to perform the secondary update. For example:

<a href="URL1" target="Frame1" onClick="top.Frame2.location='URL2';">Update
frames</a>


You must be aware that not everyone browses with JavaScript enabled.
Indeed, I often have it disabled. So, you must consider whether that is
the most effective way to do what you would like.

There are several options you should consider:

1. If it's not important that the frames change together, then provide
an additional non-JavaScript link for the user to load the secondary
content, that would normally load with the onClick.

2. Create a second frameset document that includes both files. Then
link to that document using target="_top", so it replaces the current
framset with the new one. Just don't forget to include suitable
<noframes> content for every frameset you use.

3. Stop using Frames. The cause many usability problems, especially if
not done correctly. But even if they are done correctly, they can still
cause problems, which has been discussed many times, and is all in the
archives.
http://htmlhelp.com/design/frames/whatswrong.html

There are very few sites that make good use of frames, so the chances
are that yours doesn't. You must consider whether they're really
necessary for your site.

Jul 23 '05 #3

P: n/a
On Wed, 17 Nov 2004, Tammy wrote:
Thank you Lachlan, for the response.

You and several other people have mentioned that I shouldn't use
frames, but no one has said what I SHOULD use in place of frames.
That's the wrong approach. You didn't choose frames solely becase you
wanted to choose frames, but because you had some idea that it would
help to achieve your intentions, whatever those intentions might have
been.

Normally on this group we assume that authors' intentions are to
communicate well with their readers in a WWW context.
Up at work someone said something about using Flash, but I haven't
the first inkling on where to begin with flash (nor do I have that
software).
So keep it that way ;-)
So please enlighten me. These pages that I'm creating are for my
family genealogy and are very important to me.
This is potentially worrying. They *ought* to be very important to
your intended readers. If you're only making pages for yourself, then
I'm not sure what use our advice could be.
Any help or suggestions would be greatly appreciated.


Content marked-up honestly with HTML, aiming for "strict": images in
JPEG, or PNG or GIF, according to their nature; presentation(s)
suggested with CSS; *optional* extras with whatever appeals to you,
provided it falls-back gracefully for those who can't use it.

If you have some specific kind of content, ask about that specific
kind - but don't ask "what do I use instead of [unsatisfactory
solution]?" without mentioning the problem that it was meant to solve.

good luck
Jul 23 '05 #4

P: n/a
On 17 Nov 2004 01:48:18 -0800, Tammy <ta*****@yahoo.com> wrote:
You and several other people have mentioned that I shouldn't use
frames, but no one has said what I SHOULD use in place of frames.
Anything but...
Up
at work someone said something about using Flash, but I haven't the
first inkling on where to begin with flash (nor do I have that
software).
.... except Flash.

Use good old-fashioned HTML.
So please enlighten me. These pages that I'm creating are for my
family genealogy and are very important to me. Any help or
suggestions would be greatly appreciated.


What's good is that you're passionate about the topic of the site. Aim
that passion toward making it easy as pie for the visitor to find out what
they want to know.

Let's start with any random page. Likely, you'll have a main heading <h1>
which describes the page's role in the whole site. Then perhaps some
sub-headings <h2> to further break up the page content. Then paragraphs,
lists, etc., all of which are organized in a logical structure.

Some text will also be links. Add this to the good structure you've
developed.

Then you may want some items on every page - a logo image, a navigation
list of links, etc. Ideally you will include these with PHP or SSI. If you
don't have access to these on your server, you'll need to paste them into
each document.

What you'll now have is a very content-rich but design-boring page. Add
CSS to change colors, position items as you prefer, basically to style the
content to look as your visitor would find most attractive.

That's it in a nutshell. Do this a hundred times, you have a very good
site. Of course, your CSS is reusable on each page, and after a few pages
you'll have developed a template for your HTML structure.

Bottom line - keep it simple. The trickier you get, the more likely you'll
do something that keeps a visitor from being able to use your site.
Javascript is fine if you are sure the site works already without it. Even
Flash is fine if the user doesn't need it. Your goal is to make a page
which works even if you disable the stylesheet, the images, everything but
the HTML.
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.