|
|
 |
Re: FN-FORUM Dynamically creating links from arrays
date posted 18th April 2001 09:46
peter,
instead of 2 arrays couldnt you use an array of objects?
function linx(url, txt){
//contructor for linx object
this.url=url;
this.txt=txt;
}
arrLinx=new Array
//create array of linx objects
arrLinx[0]=new linx('www.site1.com', 'site1')
arrLinx[1]=new linx('www.site2.com', 'site2')
.........
function writeout(){
//display array of objects/properties
for (a=0;a I have two arrays. One array is a list of text strings, the other
> array is a list of URLs.
>
> I need to dynamically create a page of links from these two arrays
> when the page is downloaded to the browser.
>
> I'm sure it can be done in JavaScript as David Flanagan's O'reilly
> Javascript book shows (section 14.6 Links), but I'm having problems
> getting it working.
>
> Anyone had any experience with this kind of situation?
>
> peter
> www.petersmall.net
>
>
>
> ============================================================
>
> * Free listing for freelancers
> * Free to advertise jobs
> * Free jobs distribution service
> * Free database of 1000 freelancers
>
> Freelancers and Freelance Jobs
> http://www.freelancers.net
>
> To post to the Forum:
> [EMAIL REMOVED]
>
> To unsubscribe please email:
> [EMAIL REMOVED]
>
> If you have difficulties unsubscribing please email:
> [EMAIL REMOVED]
>
> To subscribe to the digest for this list or for further information please
visit:
> http://www.freelancers.net/forum.html
|
 |
|