Solved

pagination jumping to anchors

Posted on 2007-04-10
3
320 Views
Last Modified: 2010-04-16
Im not a javascript or HTML expert so bare with me:
we have a page that shows results in a table- that table has pagination at the top and the bottom of the table.
the pagination is a "<<prev" link, a select page select control, and a "next>>" link
when a link is clicked the page gets the next range of results and then jumps to an anchor at the top of the table in an "onclick" event.

Our problem is that when selecting a page in the select control, there is not an onclick event fired, so we do not know how to get it to jump to the top anchor.

Any ideas??

Thx in advance
Apuma
0
Comment
Question by:apuma
[X]
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
3 Comments
 
LVL 33

Accepted Solution

by:
knightEknight earned 250 total points
ID: 18885187
you can use onChange in the SELECT control to call the same logic that you call in the onClick of the links.
0
 
LVL 7

Assisted Solution

by:mzalfres
mzalfres earned 250 total points
ID: 18885342
If I understand your problem correctly, you are using select HTML control. It has 'onChange' event. You can use it the same way as 'onClick' and assign the same (or another) JavaScript function to it.

<select onChange="some_func();">
<option > val1 </option>
<option> val2 </option>
...
</select>

By the way, select and option can also have 'onclick'.
0
 
LVL 1

Author Comment

by:apuma
ID: 18885572
The links where not using javascript to get to the anchor,  they just use an href
the select doesnt have an ahref property.

I guess we needed to know the javascript funtion that got you to the top of the page which we found to be
window.location.hash='top';
thx for the help
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

730 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