View Full Version : scroll at page reload problem with ajaxtabs

04-14-2017, 11:49 AM
1) Script Title: Ajax Tabs 2.2

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem: I use old ajaxtabs to load .php page that query on my db for long data list on my web platform. It works good except for page reload or when moving between tabs. Infact when I reload page or when I insert data in a modal form, there's no way to have it at the same scroll point it was. This is because, I guess, the php file called in each ajax tabs makes request, take long time and simply reload at top.
I've tried some js scripting but I'm not a programmer.. I'm to force back da scroll, but it came before ajax complete the php page loading and so it don't work.
As the creator of the code I ask you if there a way to edit the script to something like: ok register the scroll position and after ajax complete/success scroll the page to previous position. Ideal could be that there's an option to decide if get scroll position on tab click, whole page reload or both.

Hope that still someone is in touch with this code
thank you

04-20-2017, 01:53 PM
After some experiment I've found a custom function in the ajaxtabs.js and used it for applying a simple rewturn false;
so in the end here's the code (you can add it in the main js or use in the page where you set the script

MYINSTANCE.onajaxpageload = function(pageurl) {
return false;

05-02-2017, 02:58 PM
after two weeks suddenly this stopped working,
can't understand why.
Please any idea?