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.

Can I include divide or plus symbols in a CDML tag

Featured Replies

I have a .gif on one of my pages. I want the width of the .gif to be determined by a FM field. Can I get something like this to work:

<img src="images/bar.gif" alt="" height="9" width="[FMP-field: Research::Q%] /1.5" border="0">

The field Q% is a FM Field with a number in it. I want that number to be divided by 1.5 for the width of the .gif.

I know I can use a different field in FM to do this as a calc, just wanted to know if it can be done using CDML.

Larry

HTML is for describing content, it's not a programming tool. Due to static nature of HTML you need to perform the calculation (value divided with 1.5) somewhere else. You could do this with javascript or just do the calculation in FM.

Some Javascript could look like this:

<script>document.write('<img src="images/bar.gif" alt="" height="9" width="' + ([FMP-field: Research::Q%] /1.5) + '" border="0">');</script>

Good Luck.

Garry

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.