Solved

pagination jumping to anchors

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
javascript: add id amounts 5 46
Jquery 10 19
asp.net input html code have it display the content 2 10
alert(innerHTML); 7 8
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

774 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