title: How to fix dynamic code evaluation issue in fortify scan because of using eval() in java script
body: <p>HP fortify scan shows a dynamic code evaluation issue shows as below.It says eval() function in javascript leads to security issue. How fix this security issue.
   Below given is the code.</p>
  
  <pre><code>        if (objItem.column == 'leftColumn')
          {
              strItems = lcItems.value
          }
          else if (objItem.column == 'rightColumn')
          {
              strItems = rcItems.value;
          }
          else if (objItem.column == 'toolbox')
          {
              strItems = tbItems.value;
          }
          objItems = eval(strItems);
          item = null;
  </code></pre>
  
  <p>Here eval(strItems); is code for security violation. How fix this issue. see the issue details and recommendations to fix issue
  <a href="http://i.stack.imgur.com/0bEet.png" rel="nofollow">Issue explanation</a></p>
  
  <p><a href="http://i.stack.imgur.com/w6Hlc.png" rel="nofollow">Reccomendation to fix issue</a></p>