Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Keep scroll position after refresh of page

Featured Replies

  • Newbies

I have sections that hide/show after clicking on an HTML tag of each section. The sections hide/show thanks to JavaScript code.

 

The problem is after the user click on the tag and the section below shows/hides, the page refreshes and the scroll goes to the top of the page. I want the scroll to remains where it was before the user click.

 

I added a few lines of JS

<script type="text/javascript">             
function refreshPage () {    
      var page_y = document.getElementsByTagName("body")[0].scrollTop;  
      window.location.href = window.location.href.split('?')[0] + '?page_y=' + page_y; 
	  }           
</script> 

This code works in a HTML document opened in a browser (Chrome/Firefox/IE), but it doesn't work in Filemaker.

 

Do you have any ideas?

Please complete your profile. What version of FileMaker, what OS, What platform. Here is a quick link to MY PROFILE.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.