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 tags inside Javascripts?

Featured Replies

Hello

I am trying to make a solution involving both Javascript and a Filemaker 5 database, but I cannot get even the simplest Javascript to work. Am I missing something out? I have searched the Net and books available to me for a solution, but no luck.I haven't found any threads here giving hints to this problem.

Example. This little test-script:

<script language="JavaScript" type="text/javascript">

<!--

alert('[FMP-CurrentRecID]')

//-->

</script>

It just displays "[FMP-CurrentRedID]" instead of, lets say "7". When I put the tag [FMP-CurrentRecID] on the page it displays the number ok, but not inside the javascript.

What am I doing wrong?

Hi Lange,

What you can try is to create a function with a parameter that's passed to the alert() function:

<HEAD>

<SCRIPT LANGUAGE="javascript">

<!--

function showalert(message) {

alert(message);

}

// -->

</SCRIPT>

</HEAD>

<BODY>

<P><A HREF="javascript:showalert('[FMP-CurrentRecID]')">Click here to send the RecordID!</A></P>

</BODY>

This should do the trick.

Greetz,

Jorick Schram

VODW Marketing

...great... spaces won't work .... crazy.gif" border="0

Lange

sometimes, when FM web companion must evaluate the script, the comment tags are blocking this.

I do not know if it will help, but try without them.

as i'm sure you know the comment tags are only there to hide from older browsers.....if you look at the stats of browser types out there it shouldn't be a problem for > 90% of your visitors

Lasso has the [html_comment] tag for this......maybe this should be added to the WC wish list?!?

  • Author

Hi all

Thanks for your replies. The idea of removing the comment tags was brilliant. Now it works!

I had not come across this problem before. And it did all the difference! The problems with older browsers; well I think I can live with that - gonna try at least :-)

Best wishes

Lange

That I am trying to give you all -- brilliant ideas smile.gif" border="0

I am such a humble person...

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.