Results 1 to 3 of 3

Thread: scroll at page reload problem with ajaxtabs

  1. #1
    Join Date
    Apr 2017
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default scroll at page reload problem with ajaxtabs

    1) Script Title: Ajax Tabs 2.2

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tent/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
    Dave

  2. #2
    Join Date
    Apr 2017
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

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

  3. #3
    Join Date
    Apr 2017
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hi,
    after two weeks suddenly this stopped working,
    can't understand why.
    Please any idea?

Similar Threads

  1. how to reload page just once
    By mutago in forum JavaScript
    Replies: 4
    Last Post: 04-12-2014, 12:28 PM
  2. Page Auto Scroll Problem
    By davidjohny in forum Dynamic Drive scripts help
    Replies: 14
    Last Post: 04-23-2011, 08:26 AM
  3. ajaxtabs rel problem
    By jackavin in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 04-23-2008, 07:09 AM
  4. Replies: 3
    Last Post: 07-13-2006, 09:39 PM
  5. Replies: 1
    Last Post: 06-01-2006, 08:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •