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.

javascript not executing in FP10 web viewer

Featured Replies

I'm evaluating FP10, and javascript is failing to execute in my web viewer. here is a sample:

http://www.omansion.com/2020/fp10-test.html

this works identically in FMP 8.5 and in Safari. But in FMP10, it is busted. I wonder if it is because I have installed webkit?

Any help is greatly appreciated! -Dan

Edited by Guest

It works fine as is in web viewer.

What problems are you experiencing?

  • Author

I just created a test database with just 1 field and 2 web viewers.

1 web viewer is just the web address to the file I posted. The other web viewer uses: "data:text/html," & web viewer test::html

at first, only the former worked correctly. I say 'at first'. When I just now went into layout mode to check the web viewers' syntax, then back to browse mode, now both viewers are working correctly. bizarre. I'll do some more testing to see if I can isolate the issue.

For the record, what appeared to be the problem was that the jquery function wasn't executing. What you would see is an empty calendar with some colored data underneath.

  • Author

This appears to be some odd refreshing issue. I'm still testing. sometimes the bug appears. sometimes it doesn't.

Edited by Guest

There are some known problems with how web viewer works in this way. If you use javascript to display document.URL you will see that for data:text/html method the document URL changes constantly when the page is refreshed. This can cause problems you describe.

  • 2 months later...
  • Author

I know this is an old thread so I wouldn't be surprised if nobody replied to me on this one. I basically back burnered my FMP10 evaluation, and am still on 8.5. If the true answer to this issue that there are problems with data:text/html, then why is this consistently working correctly for me in 8.5? Has something changed between 8.5 and 10? And what about 9? Is it problematic like 10, or solid like 8.5? Anyone know?

  • 2 months later...
  • Author

for the curious, I solved this issue.

1st, FMP 9+ didn't like jquery ui's datepicker (8.5 was ok w/it)

so I just used the Date method instead.

Then it didn't like the fact that cluetip and my initialization scripts were referenced as remote files (src). when I embedded the scripts in my html file, then it started working.

There you have it.

Edited by Guest

I know this is an old thread so I wouldn't be surprised if nobody replied to me on this one. I basically back burnered my FMP10 evaluation, and am still on 8.5. If the true answer to this issue that there are problems with data:text/html, then why is this consistently working correctly for me in 8.5? Has something changed between 8.5 and 10? And what about 9? Is it problematic like 10, or solid like 8.5? Anyone know?

It has always worked on Mac. The problem was a Windows problem. That's where FM9 made data URLs official xplat features.

  • Author

Thanks for the reply. I've solved the issue. The problem was unrelated to using the data URL, but rather Filemaker 9 and 10 didn't like executing jQuery code that was referenced via the src tag. I can include jQuery that way, and even some extra libraries, but my

$(function() {

...code goes here...

});

function had to be included within the HTML file itself. this is a definite difference between 8.5 and 9+, as my code worked fine on 8.5 and still does.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.