AnsweredAssumed Answered

How could I pass a variable to this calculation

Question asked by shae1725 on Jul 29, 2014
Latest reply on Jul 31, 2014 by calebmiranda

Title

How could I pass a variable to this calculation

Post

     Line    context.fillstyle = \"red\"
     how could I link the "color" to  field named  test::color  or how to pass a variable ?
     I have tried everything I can think of.
      
      
      
      
     "data:text/html,
     <!DOCTYPE HTML>
     <html>
       <head>
         <style>
           body {
             margin: 0px;
             padding: 0px;
           }
         </style>
       </head>
       <body>
         <canvas id=\"myCanvas\" width=\"578\" height=\"200\"></canvas>
         <script>
           var canvas = document.getElementById(\"myCanvas\");
           var context = canvas.getContext(\"2d\");
      
           context.beginPath();
           context.rect(188, 50, 200, 100);
           context.fillStyle =  \"red\";
           context.fill();
           context.lineWidth = 7;
           context.strokeStyle = \"black\";
           context.stroke();
         </script>
       </body>
     </html>"

Outcomes