Skip 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.

Variable img width with CDML

Featured Replies

Creating variable length graph bars:

Using <img scr = "xyzpixel.gif" width="abc">

where abc = a field value calculated by a constant. The thing is that I do not want the field value to change but only to be calculated and substituted for the img width.

Maybe something like [FMP-Field: efg] * 100 within the format file.

Any other suggestions on how to do this would be great.

This doesn't directly answer your question, but should take care of your issue, if I understand what you want to accomplish:

http://developer.netscape.com:80/docs/technote/javascript/graph/index.html

This is the portion of my code that I use with the javascript graphing file to insert the FMP data (result of a query):

var g = new Graph(600,400);

g.addRow(0[FMP-record],[FMP-field: GraphElapsed][/FMP-record]);

g.scale = 10;

g.title = "Processing Time";

g.xLabel = "Calls";

g.yLabel = "Time Min";

g.build();

  • Author

OK, this graph builder looks great for the long run - something I will probably use a lot. Does it only work on Netscape? Ever time the page loaded in Explorer it locked up!

I am still looking for an answer to this problem using CDML if anyone can help.

It'd create a calc field in the database that works out the maths for the width value. The code in the format file could be:

<img scr = "xyzpixel.gif" width="[FMP-Field: widthcalc]">

  • Author

Thanks Vaughn. That worked great. The problem now is that I have probably about a hundred fields that need to be calculated with the orginal value fields staying the same. How do I get around making a hundred other fields just to calculate the orginal values of each field?

Errr, I dunno.

Do you have a hundred fields to calculate, or a hundred *records*? I assume you meand records: the solution I posted only used one calculation field.

You originally wrote "abc = a field value calculated by a constant." How complicated it is depends partly on how complicated you want to make it. You should try hard to make it easy, but if each image is different from all others then it's going to be a lot of work.

That's why I suggested using the calculatin field: you can enter in an algorithm and let it do the maths. But if ther are all different there is only one way to do it: a record at a time.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

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.