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.

CDML? HTML? JavaScript?

Featured Replies

Okay, I've had a first class education in the last month in moving into FMP and the web. Sometimes I feel like I've bitten off more than I can chew, but always manage to work my way out of the corner (with many, many thanks to my FMFORUM friends).

Now here's the point that I haven't been able to clarify yet. Just when do I know it is time to use CDML rather than HTML, and when do I know I am supposed to use JavaScript instead of the other two? It seems there are some things covered by all three. How does a novice know how to choose correctly?

You use CDML when you need to extract the data from filemaker. HTML is a standard language used in everything to make things look nice. It's for formatting or making forms which enable users to submit data to the filemaker database. Javascript is a client-side scripting language (the script executes on the users machine rather than on the web server). You can use this to control how the user has data presented to him during his visit, or control what they can do. This type of scripting language is not really secure. For example, if you are submitting multiple forms and use a javascript function like window.open to have multiple browser windows open and each one submitting a form, the user can interact with the windows and mess with what the script is performing. A better language for scripting is php, asp, or perl (server-side languages).

All of these languages can be used together. For CDML, it goes inside an HTML document. You use HTML as you would normally to make your webpage, but when you need data from filemaker you can use CDML commands. If you need to control what the user can do, you can place a javascript in the html document as well. Just call the script in between the <head> tags and then call upon it later in the <body>. Thats about it with CDML and javascript. They are pretty simple.

Justin Grewe

  • Author

Thanks Justin, that ties it together for me. Now it makes sense. BTW, used to travel through Berea frequently on the way to my grandparents in London (in the days before I-75). It's a lovely area.

Just to amplify what Justin said, JavaScript can interact with the elements of a form on a page, then submit it. This is commonly used for the "you didn't fill in your email" type alerts. It can also use the element of a form to set a FM token, before submitting the form.

This can be very useful if you need to "fork" the next action depending on the entries. And it's not all that hard to do, 'cause I can do it, and I'm no JavaScript expert by any means.

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.