title: javascript pass eval variables
body: <p>i have eval function, which needs to execute javascript from php. but i need to pass element, so i can put mouse over tips on the link user clicked on. </p>
  
  <pre><code>var globalEval = function globalEval(src, element) {
          if (window.execScript) {
              window.execScript(src);
              return;
          }
          var fn = function(element) {
              window.eval.call(window,src);
          };
          fn(element);
      };
  </code></pre>
  
  <p>im using following way to pass <code>$(this)</code> element</p>
  
  <pre><code>globalEval(js_code, $(this));
  // js_code is = alert(element);
  </code></pre>
  
  <p>i get error of undefined element, which is defined in <code>globalEval();</code> how can i fix this?</p>