Force load #6

Closed
softshape opened this Issue Dec 9, 2011 · 5 comments

Comments

Projects
None yet
3 participants
@softshape

There's a case where "show more" link should be displayed, but when user clicks on it the script should load next page by AJAX. This can be implemented two ways -

  1. Adding some class name to the link which says "don't hide me" and processing the click as it usually process scrolling.
  2. Implementing "force next page load" function available from the page's JavaScript, then developer can call it from his own code.

Is there support of any way (or may be any other way) to make force load currently?

@fieg

This comment has been minimized.

Show comment Hide comment
@fieg

fieg Dec 12, 2011

Member

So basically you want the next page be loaded after the user clicks a link, instead of automatically when you user scrolls down?

Member

fieg commented Dec 12, 2011

So basically you want the next page be loaded after the user clicks a link, instead of automatically when you user scrolls down?

@softshape

This comment has been minimized.

Show comment Hide comment
@softshape

softshape Dec 12, 2011

Exactly. Not always, but for links marked by some class or any other way. As real case, I'd make 7 pages with usual links and on 8th put this marked link. If user clicks on it, then 7 more pages with auto-scroll and stop on 8th, etc.

Exactly. Not always, but for links marked by some class or any other way. As real case, I'd make 7 pages with usual links and on 8th put this marked link. If user clicks on it, then 7 more pages with auto-scroll and stop on 8th, etc.

@fieg

This comment has been minimized.

Show comment Hide comment
@fieg

fieg Dec 19, 2011

Member

I have plans to add more event handlers to IAS which would allow for more customization. Also, I like your idea to have an option to goto the next page after clicking a link. But I don't think it will implemented anytime soon.

Member

fieg commented Dec 19, 2011

I have plans to add more event handlers to IAS which would allow for more customization. Also, I like your idea to have an option to goto the next page after clicking a link. But I don't think it will implemented anytime soon.

@fieg

This comment has been minimized.

Show comment Hide comment
@fieg

fieg Feb 16, 2012

Member

@softshape you might want to have a look at the onLoadItems callback I added today. I think you can use it to make the functionality you were looking for.

What you probably want to do is:

  1. store the items retrieved via the onLoadItems callback in a temporary variable
  2. return false in the callback to prevent automatic insertion of the items by IAS
  3. insert the items manually onclick of the link
Member

fieg commented Feb 16, 2012

@softshape you might want to have a look at the onLoadItems callback I added today. I think you can use it to make the functionality you were looking for.

What you probably want to do is:

  1. store the items retrieved via the onLoadItems callback in a temporary variable
  2. return false in the callback to prevent automatic insertion of the items by IAS
  3. insert the items manually onclick of the link

@fieg fieg closed this Feb 16, 2012

@mplungjan

This comment has been minimized.

Show comment Hide comment
@mplungjan

mplungjan Apr 21, 2012

I think the asker is looking at Google image search - it continuously scrolls for a few pages, then at a certain stage it shows "Load more images" instead of scrolling - when you click on that, the infinite scroll continues - in their case till end, but I suggest to give a parameter of pages or number of records to allow before showing the link again. It is not convenient to store the next page in a var, but simply have a number of records to show before stopping

I think the asker is looking at Google image search - it continuously scrolls for a few pages, then at a certain stage it shows "Load more images" instead of scrolling - when you click on that, the infinite scroll continues - in their case till end, but I suggest to give a parameter of pages or number of records to allow before showing the link again. It is not convenient to store the next page in a var, but simply have a number of records to show before stopping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment