471,337 Members | 1,162 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Inside Anchors

Now I have a question myself :)

I am working on a website for a Hotel and on the first page we have a
flash movie that shows the latest news items. The news items are
retrieved from the database and shown in the movie.
The news items do all have a summary and some of them can have a more
detailed text.

If there is detailed text available I want to open the detailed text of
the news item, after clicking the item in the flash movie. This is
working without problems.

But if there is no detailed text I want to jump to the list with news
items and then jump to that specific news item with the anchor.

An example url for linking to the news-item is:

http://www.example.com/index2.php?p=...&language=NL#3
(note: the target of this link = "_top")

index2.php is the frameset containing a header, a left navigation and
content frame. All parameters in this URL are passed on into the file
which is loaded in the content frame.

news is the news.php file which is included into the content.php file in
the content frame. This file has all parameters available.

The news.php has a <a name="3"></a> just before the corresponding
news-item, but I can't get it to work.

The strange thing however is that if I use the anchored link in the
document itself, it is working. (on the top of the list with news-items
there are all hyperlinks in the style:

http://www.example.com/content.php?p...&language=NL#3
And this hyperlink is working (document is opened in the same frame)

Has it to do with the fact that the frameset is called (because of
refresh navigational items), even if the parameters are all passed on or
am I missing something trivial?

Thanks....

Mark
Jul 17 '05 #1
1 2331
In reply to my own problem (or should I say challenge :P), which I have
also been able to solve, hereby my solution.

This was some lack of thinking on my behalf, because I should have known
that you can't use an #anchor as a parameter and give that to a frameset
where three other documents are requested. So the anchor already is lost
there. So I added another document, which is included in the frameset to
a PHP parameter and inserted a prenews document which retrieves all the
parameters (all parameters are passed on in this document) and then a
javascript document.location.replace('url') will be executed with of
course the url rewritten with the #anchor added. Because I am now in the
same frame of the frameset, the document jumps to the correct anchor
inside the document

Mark

Mark Kuiphuis wrote:
Now I have a question myself :)

I am working on a website for a Hotel and on the first page we have a
flash movie that shows the latest news items. The news items are
retrieved from the database and shown in the movie.
The news items do all have a summary and some of them can have a more
detailed text.

If there is detailed text available I want to open the detailed text of
the news item, after clicking the item in the flash movie. This is
working without problems.

But if there is no detailed text I want to jump to the list with news
items and then jump to that specific news item with the anchor.

An example url for linking to the news-item is:

http://www.example.com/index2.php?p=...&language=NL#3

(note: the target of this link = "_top")

index2.php is the frameset containing a header, a left navigation and
content frame. All parameters in this URL are passed on into the file
which is loaded in the content frame.

news is the news.php file which is included into the content.php file in
the content frame. This file has all parameters available.

The news.php has a <a name="3"></a> just before the corresponding
news-item, but I can't get it to work.

The strange thing however is that if I use the anchored link in the
document itself, it is working. (on the top of the list with news-items
there are all hyperlinks in the style:

http://www.example.com/content.php?p...&language=NL#3

And this hyperlink is working (document is opened in the same frame)

Has it to do with the fact that the frameset is called (because of
refresh navigational items), even if the parameters are all passed on or
am I missing something trivial?

Thanks....

Mark

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Ben Wilson | last post: by
5 posts views Thread by metalseb | last post: by
2 posts views Thread by learner | last post: by
21 posts views Thread by adrian suri | last post: by
3 posts views Thread by ryan.mclean | last post: by
12 posts views Thread by Rich | last post: by
3 posts views Thread by windandwaves | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.