?
Solved

Speeding up scrolling to bookmark

Posted on 2008-09-29
5
Medium Priority
?
145 Views
Last Modified: 2012-05-05
Hello,

We have a framed page. In the main page, there is a list of categories.

If you click on a category, a request is to made to the server, and the frame then contains the list of categories, and the subcategories for the category clicked on. The link also includes a #bookmark so that it can jump down to the category selected.

The problem is, there is a brief delay where you see the heading of the frame before it gets down to the bookmark. It just looks jumpy.

Is there a way one can speed that up?

The syntax looks like:

<a href="?F=1&cid=1#1" target="main" >

Thanks in advance,

Steve
0
Comment
Question by:skbohler
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:mverschoof
ID: 22597120
I don't think this is possible. The page first loads and then jumps to the position. This is how the browser works.

And a small tip. Don't use frames. It's disapproved by almost everybody, including w3c. With CSS positioning and 3 div's you don't even need it.
0
 

Author Comment

by:skbohler
ID: 22597225
Thanks.

It's an old framework that would require a ton of work to remove them.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22600022
"If you click on a category, a request is to made to the server, and the frame then contains the list of categories, and the subcategories for the category clicked on. "

That is where your delay is -- a server request.  Why do you need to do this on the server?  Why can't you put the lists for each page going into a frame within that page, with accompanying javascript to go to it.

Or else, just have the links for each page include the bookmark --

A href = "thispage.html#bookmark"

Although frames are old coding now, you don't have to redo the whole page to get this faster, unless I am missing something.
0
 

Author Comment

by:skbohler
ID: 22600076
We could download the subcategories and hide them with div. But, if you then click on a subcategory and click on the back button, it doesn't remember the div state (showing instead of hiding, that is).

Or am I misunderstanding you?

Can you elaborate on what you mean by "have the links for each page include the bookmark"?

Steve
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 1000 total points
ID: 22600285
"click on the back button, it doesn't remember the div state "

Clicking the back button is an entirely different issue.  In IE, the history only includes separate pages, it does not consider going from index.html to index.html#bookmark1 to be a different page, it is the SAME page, just a different position.  So in most cases IE won't show a series of in-page anchors in the back history.

In each HTML page that is going into a frame, are the links in that page (as well as anchors) to where if someone clicks on a link (top contents list) the page itself jumps to this in-page anchor.  If you can answer that, we can go from there.  But if the table of contents links is NOT in the HTML page, but has to be delivered from the server FIRST, before the frame shows it -- then you won't get rid of the delay.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question