473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 2417
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Ben Wilson | last post by:
To anyone who can help me, you have my thanks in advance. I am implementing a "301 Moved Permanently" redirect in my website due to a change of our domain names. Unfortunately, I am having a...
1
by: Peter Jakobi | last post by:
Hello, I want to place two lines relative to another. The problem is, that these two lines are in different groups. Is there an possibility to set the x and y values of the second line with...
5
by: metalseb | last post by:
Hi folks I want to implement a full CSS navbar on the top of my page. Basically, this is a DIV with links on <li> tags shown in inline display. Things are going right, but if I want to show a...
2
by: learner | last post by:
Hi, A document has many Anchors. I want to take a particular action only if some particular anchors are clicked. I mean if some anchors are clicked, i want an alert box to pop up with ok and...
21
by: adrian suri | last post by:
Hi just started to experement with styleshhets, and have defined hover a:hover { Color : red; Text-decoration : none; Border-top-width : medium; Border-right-width : medium;
3
by: ryan.mclean | last post by:
Hi all, I hope somebody here can help me, I am attempting to obtain a reference to the anchors inside of a table. Here is what I have: table = document.getElementById(a_strTableId); for(var i...
0
by: udit_handa | last post by:
I am creating a scheduler using tables and Adding server side html Anchors in a page. As long as i click other buttons created at design time the viewstate is maintained but these server side...
12
by: Rich | last post by:
Strangely, on-page anchors will work on MSIE, but not on Netscape7.2 or Firefox1.5. All anchors are numbers e.g. <a href="#21">TOPIC</a> supposed to connect down to <a name="#21>beginning of...
3
by: windandwaves | last post by:
does it matter if I write var anchors = document.getElementsByTagName("A"); or var anchors = document.getElementsByTagName("a"); Or is there a better way to catch both <a hrefs and <A...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.