How to keep window in place?

K

kaeli

dungping5 said:
Hello,

My question is in the following web page:

www.pinyinology.com/sortable/table_test.html

Thanks.
Juli Zhang

"when clicking to sort the second table, the window moves up"

No, what it does is reload the page. Because that's what you've done. You're
passing a param to the page, which basically reloads it.

http://www.pinyinology.com/sortable/table_test.html?sortByPinyinsh
^^^ that reloads page

Want it to not do that? Don't use param (URL) passing. Call the function in
the link onClick instead. Keep the param if you want to implement server-side
sorting for non-script browsers (return false prevents scripted browsers from
following the link and reloading the page).

<a href="?sortByIDp" onClick="sortByIDp(a, b);return false;">ID</a>
(note: change (a, b) as appropriate)

--
--
~kaeli~
Murphy's Law #2030: If at first you don't succeed, destroy
all evidence that you tried.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top