Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Link Title Upon Scrolling.

Status
Not open for further replies.

JBorges

Technical User
Jan 12, 2009
57
DK
Hi,

When making links to a location on the same page it is possible to give it a name, i.e., <a name="page6" title="Page 6"/>. And so when your mouse hovers over the the part of the html-file that contains the <a name...> code a little yellow box appears saying "Page 6".

I was wondering whether it is possible to display this title tag when you simply start scrolling down the page. Let's say you have divided a single html file into many pages with links to locations on the same page, so when you start scrolling it automatically shows you when the page changes from 6 to 7 to 8 and so forth.

I hope I have explained it well enough.

Philip
 
I think I understand what you are saying... you want something like how Adobe PDF shows which page I am currently on. If I keep scrolling to the next page, the page number updates. Is this correct?
 
Yes that's correct. The yellow box is shown continually as I would scroll down and then change from Page 6 to Page 7 etc.

But is this doable in html?
 
No. First of all, HTML is not paged format and most of the time pages have no meaning in HTML. If you would wish, you could mark up your text to have specific pages defined, but you would still need some sort of scripting language to show the page numbers. The best you can do in HTML is the attribute you've experienced, the title attribute (not the name one which you thought was responsible. This title attribute allows you to display additional information on any element in HTML and most browsers tend to display this extra information as a tooltip. You would thus be able to put title on paragraphs or divisions and if users would hover over them, they would get the tip which page the current paragraph belongs to. That's the best you can do.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top