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.

[FP5] Cookies via CDML vs Javascripts?

Featured Replies

I've read several threads about setting cookies with FM / CDML. It seems that nobody trusts FM to do that task and always suggests using javascript to do it. Whats is the problem with using [FMP-SetCookie]?

I've made some code that sets the cookie from FM using [FMP-SetCookie] and it seems to be working fine.

I wanted to use javascript, but my problem with javascript is that when I set the cookie with a value from CDML [FMP-Field: blabla] inside the javascript, FileMaker doesn't replace the value, using the value from the field "blabla" - javascript simply sets the cookie value to: [FMP-FIeld: blabla]!

What am I doing wrong? And why shouldn't I use [FMP-SetCookie]?

Thanx

Bleppe

FileMaker Version: 5

Platform: Mac OS 9

I believe that the reading of the Cookie by FM is a bit unreliable.

Good Luck.

Garry

  • Author

So it is only the reading of the cookie by FM that is unreliable? Not the SetCookie?

If that is true, then I'm happy with my solution...

Thx

Bleppe

hi, just two point that have been said many times before

1 FileMaker ignores anything inside comment tags, so leave those out of your Javascripts if you embed CDML tags into it.

2 FileMaker cookies work cross platform/cross browser until you start adding time paramenters to them. I can set a cookie with FileMaker and read it with php and vice versa without any problem, BUT I'm only using ones that expire at the end of the session.

regards, jeff

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.