Solved

pagination jumping to anchors

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now