title: Calling javascript variable parameters from global function on the <a href > onclick even
body: <p>I am desparate now to find a solution to this problem.  I'm trying to call a function on the onclick even inside another function.  The event works fine if the parameters are static.  I want to get a the value from the global function.  The example is as follows: </p>
  
  <pre><code>var dataxml = unescape(xml);    
  var xmldoc = getDomAdapter().parseXml(dataxml);
  var rootnode = xmldoc.getElementsByTagName('result_set')[0];
  var newsresult = rootnode.getElementsByTagName('item');
  var pages = Math.round(newsresult.length / 10);
  
  for (var p=1; p &lt;= pages;p++){
      pagesref = pagesref+"&lt;a  href='#' onclick='newsdatainfo(xmldoc,newsresult,6,10);' &gt;"+p+"&lt;/a&gt; | ";
  }
  </code></pre>
  
  <p>How do I    get the xmldoc and newsresult to be identified?  Because I get an undentified error message.</p>
  
  <p>I will be greatfull if you help me.</p>