Jump to anchor with JS

Posted on 1997-08-25
Last Modified: 2008-03-10
I have a page consisting of 2 frames.  One is the "list" frame and the other is the ref "frame".
In the ref frame I have a select object set up so that when I change the select object it jumps the list frame document down to the corresponding section.
This code makes Internet Explorer do this but it relaods the list page each time.

  var a = "#" +
          + "anchor";

This code brings the browser to the right spot but as I said, it reloads the page again.  The page is too large for this to be usefull.
I need an answer as soon as possible.
Question by:pmcintos
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 10

Accepted Solution

kollegov earned 100 total points
ID: 1269166
That's because you make POST or GET action from
form submitting, you didn't post here full code
how you call this script!

but generally
you should call your function
<FORM onSubmit()='setNewLocation(); return false;'>

to avoid reloading.


Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Slush on text 2 28
Where is this content coming from? 4 40
Check if field exists SPUtility 5 48
Google Chrome: Debugging AJAX call 6 39
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
In Part 1 ( we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

751 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