Skip to Content Skip to Menu

Scroll to member list after search

  • jabba84
  • jabba84
  • OFFLINE
  • Posts: 91
  • Thanks: 5
  • Karma: 0
2 years 4 months ago #330073 by jabba84
Scroll to member list after search was created by jabba84
Hello, i have this page
This message contains confidential information
where users are listed. Now if i make a research the page reload and i see the top of the page.. i have then scroll down to the list. This is particularly a problem in mobile version.
How can i automatically scroll the page down when a research is made?
Thank you

WebMaster & JoomlaLover @ www.pixed.it

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 4 months ago #330076 by krileon
Replied by krileon on topic Scroll to member list after search
Userlists have no functionality to scroll down for you. You'd need to add your own JS to the page (you can do this using CB Auto Actions and a Code action) to scroll the results into view. This is why "Collapse Search Criteria" is defaulted to "Yes" under Parameters > Search as it will collapse the search criteria so as to not take up space.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • jabba84
  • jabba84
  • OFFLINE
  • Posts: 91
  • Thanks: 5
  • Karma: 0
2 years 4 months ago #330082 by jabba84
Replied by jabba84 on topic Scroll to member list after search
Thanks, for future users i've solved using this javascript;
Code:
// CHECK IF URL HAS SEARCH PARAMETERS var cb_regione = findGetParameter('cb_regione'); // first search parameter var cb_lastname = findGetParameter('lastname'); // second search parameter // you can add as may search params you need if((cb_regione == undefined) && (cb_lastname == undefined)) { alert("no search params set"); }else { $(document).ready(function() { $('html, body').animate({ scrollTop: $( '#cbUserTable').offset().top }, 500); }); } // I USED THIS FUNCTION TO GET THE "GET" PARAMETER function findGetParameter(parameterName) { var result = null, tmp = []; location.search .substr(1) .split("&") .forEach(function (item) { tmp = item.split("="); if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]); }); return result; }

WebMaster & JoomlaLover @ www.pixed.it

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum