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.

Using XML data within a Javascript?

Featured Replies

Hello,

I really don't know if this is even possible, but I thought I'd ask. I have an XSLT page in which a user enters an ID number and selects a checkbox for an available time slot. When the user hits the submit button, the page runs a javascript to make sure the user has entered an ID number and selected a time.

However, I want to be able to verify that 1. the time slot selected is available (meaning I want to see if the FMP field is empty), and 2. I want to verify that the user ID matches the value of another FMP field. I have no idea how I can get a FMP field value within a Javascript. Is this possible?

Thanks for your help!

Tom

When you submit a record via XML/XSLT, FileMaker does roughly the same as when you submit the record in FileMaker itself. This means that if you set some validation options and the incoming record doesn't match them, it will be rejected and FileMaker return an error. It must be somewhere in the grammar you use in the tag. In the target XSLT page you can check this value and either display an "Ok" message or "Please go back and select another slot" message. This is a simplest handler, a more sophisticated one could redirect the user back to the initial page and display the error message there and so on.

If you want to check things without leaving the page, then you need to use the AJAX technology, but this would probably be more complex.

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.