Solved

pagination jumping to anchors

Posted on 2007-04-10
3
326 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

728 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