Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

javascript not executing in FP10 web viewer


This topic is 5649 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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
Posted

It works fine as is in web viewer.

What problems are you experiencing?

Posted

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.

Posted

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...
Posted

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...
Posted (edited)

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
Posted

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.

Posted

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.

This topic is 5649 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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