Set a property as reference to an object
<p>I have a table that have a property named "recordsource" that will hold the name of the object that will fill the content of the table.</p>

<pre><code>&lt;table id="tbl" recordsource="myobj"&gt;
</code></pre>

<p>Now here are my functions:</p>

<pre><code>var myobj;

function obj()
{
  this.code = new Array();
  this.name = new Array();
}

myobj = new obj();
myobj.code = ["a","b","c"];
myobj.name = ["apple","banana","carrot"];

function populate_table()
{
  mytable = document.getElementById("tbl");
  mytableobj = mytable.getAttribute("recordsource"); //this will return a string
  //my problem is how to reference the recordsource to the myobj object that have
  //the a,b,c array
}
</code></pre>
