[Javascript] Loading Problem

Tim Makins spindrift at oceanfree.net
Wed Sep 15 04:53:07 CDT 2004


// US Counties_3 OK-WY
viewlist4 = {
colname: ["Name","State_name","Abbr","Fips","Area sq-mile","Area
sq-km","Population","Pop Density"],
colwidth: [20,20,6,6,12,12,12,12],
coldata: [
{z0:"Adair",z1:"Oklahoma",z2:"OK",z3:"40001",z4:"591.17320",z5:"1043.41",z6:
"21038",z7:"35.6"},
{z0:"Alfalfa",z1:"Oklahoma",z2:"OK",z3:"40003",z4:"874.94888",z5:"2266.11",z
6:"6105",z7:"7.0"},
{z0:"Atoka",z1:"Oklahoma",z2:"OK",z3:"40005",z4:"973.33720",z5:"2520.93",z6:
"13879",z7:"14.3"},
{z0:"Beaver",z1:"Oklahoma",z2:"OK",z3:"40007",z4:"1842.68875",z5:"1162.12",z
6:"5857",z7:"3.2"},
{z0:"Beckham",z1:"Oklahoma",z2:"OK",z3:"40009",z4:"907.61378",z5:"2350.71",z
6:"19799",z7:"21.8"},
{z0:"Blaine",z1:"Oklahoma",z2:"OK",z3:"40011",z4:"943.23562",z5:"10945.95",z
6:"11976",z7:"12.7"},
{z0:"Bryan",z1:"Oklahoma",z2:"OK",z3:"40013",z4:"936.78878",z5:"2426.27",z6:
"36534",z7:"39.0"},
{z0:"Caddo",z1:"Oklahoma",z2:"OK",z3:"40015",z4:"1280.94512",z5:"3317.63",z6
:"30150",z7:"23.5"}
]
}


Today's question:

My table-viewer uses a number of data-files, such as the above (a shortened
version). It is stored as 'table_uscount1.js', and will be loaded by
including the line:

<script src="gaz/table_uscount1.js"></script>

at the top of the page that processes it. However, if there are a lot of
these files, the 'load' gets very big and takes time. Is there a way to only
load the one I want, when it is asked for ??

Tim in Ireland.




More information about the Javascript mailing list