[thelist] JavaScript Array and Split
Hassan Schroeder
hassan.schroeder at gmail.com
Sun Feb 11 18:49:14 CST 2007
On 2/11/07, Christie Mason <cmason at managersforum.com> wrote:
> I'm so mad at myself for not "getting this" that I'm probably not asking the
> right question in the right way.
>
> External.js has
> cData=new Array()
> cData[0]='Auto
> Order|../../courseid12663/AutoOrder/autoordercm.html|772|520|0|00:00:0||'
>
> new file
> read cData array from external.js then iterate through array and split at
> pipe symbol.
You don't have to "read from" anything -- that array is just *there*.
In your "new file", try something like alert(cData[0]) in a function run
onload; if you get the content you show above, then you have access
to that array.
Then split each element of the array to get what you want.
--
Hassan Schroeder ------------------------ hassan.schroeder at gmail.com
More information about the thelist
mailing list