December 20, 200421 yr 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
December 20, 200421 yr 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.
December 20, 200421 yr 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