[thelist] To Application or Not ..

Anthony Johnston . Antix tech at antix.co.uk
Wed Jan 22 03:11:01 CST 2003

hiya,  a good way, is to store the data in a javascript file
and then reference it from your page and fill the select on load

this way the .js file will be cached on the users machine
and can be used by many pages.

something like this...

var countries=new Array();
agct[1]=new Array("GBR", "United Kingdom");
agct[2]=new Array("USA", "United States");
agct[3]=new Array("AFG", "Afghanistan");
agct[4]=new Array("ALB", "Albania");
agct[5]=new Array("DZA", "Algeria");

<script src='countries.js'>
	function fillList(l,d) {
		var i,o
			l.options[l.length-1]=new Option(d[i][1],d[i][0]);

call fillList with 'l' being the list (the select)
and 'd' being the data (countries)

I hope this is helpful,  Ant.
Anthony Johnston
	tech at antix.co.uk
Antix Software Limited

>-----Original Message-----
>From: thelist-admin at lists.evolt.org
>[mailto:thelist-admin at lists.evolt.org]On Behalf Of Michele Foster
>Sent: 22 January 2003 04:33
>To: thelist at lists.evolt.org
>Subject: [thelist] To Application or Not ..
>Hey Folks ..
>I'm working on a very large Access to web registration application process.
>Quick question .. and if anyone has any resources that I can refer to, even
>I have "huge" lists on all of my pages.  Currently the data exist in the DB
>but it's a big performance hit to keep grabbing the list data from the DB
>each time it is required.  Sometimes, it's required on more than one page
>(i.e. list of languages (247 of them so far) and a drop down to select Lang1
>and Lang2).
>I see two possible options, and I'm not sure which is best.  I can save the
>data as an Application object or I can write the data to a text file and
>loop through it that way (this is what is being used atm).  I'll need to
>create an Admin form whereby the user can regenerate (or set to null) the
>Application in question or rewrite the text file. Not a problem .. if anyone
>has any clue how (if) I could automate this to run, say every 12 hours on
>its own, that too would be helpful ..  but isn't the reason for my post.
>What's better?  Storing the data as an Application object (is that the right
>term?) or to save it as a text file and use an FSO call to the text file
>whenever the data are required.  The FSO set up currently being used is
>working well.  I'd just like to ensure I'm doing the BEST option. ;)
>(Please,  please .. let's NOT make this a discussion on why Access is evil
>.. I know, the client has been well informed .. I anticipate a change in the
>future, but not before this project is done.)
>* * 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