Solved

pagination jumping to anchors

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Recordset containing single quotes 8 23
Objects on Same Line 2 18
Bootstrap on PLNKR 3 14
Zoom the page when you go in from your phone 3 20
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…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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 the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

895 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

13 Experts available now in Live!

Get 1:1 Help Now