Click to See Complete Forum and Search --> : linking to the middle/bottom of the content frame


Daria
01-12-2003, 06:11 PM
Hi, guys.

I have a framed page, frameset big_schedule.html

layout as follows (for example),

top - top.htm
left - left.htm
content - schedule.htm

Other *.html have links to the big_schedule.html.

One of the pages has link to the particular date, say, date#10 on the schedule.htm, which happens to be in the middle of the schedule.html page, - in big_schedule.html user has to scroll down the schedule.htm page to see it.


Question: how can I arrange the link to the frameset big_schedule.html so the date#10 will be on the top of the schedule.htm content frame?

Thanks.

Daria
01-12-2003, 08:02 PM
Yes.

Daria
01-12-2003, 09:01 PM
It's actually simple (yet I cannot think of anything... maybe make a dup.page with an onload in in?...)

The schedule.htm content page contains actual schedule, and has a table with dates on it. Let's say that on one of the pages the link says "Event for December 10, 2004" . On schedule.htm there is a reference

<a name="121004"></a>December 10, 2004.

The thing is, that it is located in the middle of the page, after all the 2003 dates. If it wasn't the framed page, the link would be simple

<a href="schedule.htm#121004">Event for December 10, 2004</a>

So I would like to open the whole frameset with schedule.htm in it, as if I called for that particular anchor, so the December 10, 2004 line will load on top, as if it was commanded to go to anchor #121004 on loading.

It is a one-time thing. I mean, I may use it more then once, but I don't need anything complicated for the link that gets updated twice a year.

Stefan
01-12-2003, 09:49 PM
Originally posted by Daria

<a href="schedule.htm#121004">Event for December 10, 2004</a>

So I would like to open the whole frameset with schedule.htm in it, as if I called for that particular anchor, so the December 10, 2004 line will load on top, as if it was commanded to go to anchor #121004 on loading.


So why don't you just make a frameset with <frame src="schedule.htm#121004" ... :confused:

jdavia
01-12-2003, 09:54 PM
<a name="121004"></a>December 10, 2004.

The thing is, that it is located in the middle of the page, after all the 2003 dates. If it wasn't the framed page, the link would be simple

<a href="schedule.htm#121004">Event for December 10, 2004</a>
Try these:
<a name="121004">121004</a>December 10, 2004.

<a href="schedule.htm"target=_top#121004">121004</a> Event for December 10, 2004

If they don't work, than try these:

December 10, <a name="2004">2004</a>2004.

Event for December 10, <a href="schedule.htm"target=_top=ANOTHER.html#121004">2004</a> 2004

Something like that (I hope)

jdavia
01-12-2003, 10:02 PM
Sorry Stefan you beat me to the post. I think you hatd frames, do you?

Daria
01-12-2003, 10:38 PM
Sorry, guys, I forgot to specify, that the link itself is located on the page that doesn't contain frames.

That's why I don't just use... (any of above).

Stefan
01-13-2003, 05:11 AM
Originally posted by Daria
Sorry, guys, I forgot to specify, that the link itself is located on the page that doesn't contain frames.

That's why I don't just use... (any of above).

You need to read my post again, becuse that is exactly the question I'm answering.

Ie
Your link on a the non-frame page should lead to a frameset, and the content frame on that frameset should have the src="schedule.htm#121004"

Daria
01-13-2003, 07:57 AM
I'm sorry, maybe I misunderstood.

I've tried that, but for some reason it doesn't get through - I either end up with the blank content as an untitled-1.htm (if I do it with DW, since it's automatically kicks you back into untitled stuff), or with a page not affected by the linking to the anchor (if I write code manually).

I've set a simpler example with just two frames in the frameset.

Please, let me know what is wrong.

===============
here is the source for the original html with the link


<html>
<head>
<title>nicetry</title>
<meta http-equiv="Content-Type" content="text/html">
</head>
<a href="big_schedule.html">Event for December 10, 2004</a>
</body>
</html>


here is the source for the frameset


<html>
<head>
<title>big_schedule</title>
<meta http-equiv="Content-Type" content="text/html;">
</head>
<frameset rows="50,422">
<frame src="top.htm">
<frame src="schedule.htm#121004">
</frameset>
</body>
</html>

swon
01-13-2003, 08:25 AM
Hi Daria,

are you using a server side language like PHP,Perl etc.?

Daria
01-13-2003, 08:28 AM
Hello, and yes.

Daria
01-13-2003, 08:34 AM
Never mind - maybe it was some sort of a glitch or a typo (most likely) in my original code - because now that I ran the example one more time, example worked. I'm just going to have to set a duplicate frameset with anchor reference, since there are a lot of links from other pages to the top of the schedule.htm,

Thanks, guys! I'm going to comb through those lines of my original code to see where I goofed up.

D.

P.S. but maybe there is a way to avoid creating dup.frameset?
if not, duplicating will work, anyway - they don't take much space.

Thanks again.

Stefan
01-13-2003, 11:47 AM
Originally posted by Daria
[B]Never mind - maybe it was some sort of a glitch or a typo (most likely) in my original code - because now that I ran the example one more time, example worked.


This might be a good time to point out also that you should avoid names like the one you use, consisting only of digits.

HTML 4.01 §6.2
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").


P.S. but maybe there is a way to avoid creating dup.frameset?


Yes
* Serverside scripting (the best)
* Clientside scripting (breaks in many browsers)
* The new X-frames spec (breaks in even more browsers, if not all, since it's a brand new spec draft).

Daria
01-13-2003, 11:55 AM
Thanks, Stefan

I know about digits - I just didn't bother for the example. Sorry for that, i'll be more careful next time.

Thanks for your input. :)