[thelist] JavaScript Array and Split

Christie Mason cmason at managersforum.com
Sun Feb 11 17:49:43 CST 2007

I can't put anything into the existing external files, or am I
misunderstanding your advice?  I'm thinking I'm lost at how I read the cData
array in external1.js into a second file and then split and output within
that second file.

Christie Mason

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Rick den Haan
Sent: Sunday, February 11, 2007 5:40 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] JavaScript Array and Split

Christie wrote:
> There are various external js files that each have varying cData arrays
> look like this
> cData=new Array()
> cData[0]='Auto
> Order|../../courseid12663/AutoOrder/autoordercm.html|772|520|0|00:00:0||'
> cData[1]='Steep Slope Roofing Basics
> 2|520|0|00:00:0||'
> cData[2]='TimeCalc Payroll
> 0|0|00:00:0||'
> I found this example which close to what I need to do.
> EXCEPT it needs to read the cData array from the external js file to
> generate the list of links.


You could wrap the code that reads out/splits the array into a function, and
call that function from the external file.



function doSomething(cData)
    // split and output cData


var cData = new Array();
cData[0] = '' // whatever




* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !

More information about the thelist mailing list