Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

Re: FN-FORUM Dynamically creating links from arrays

date posted 18th April 2001 15:20

Thanks Dave Ecky and Ruth,

I solved the problem with the following:



WriteLinksScript



var arr1= Array("aa.html","ab.html","ac.html","ad.html","ae.html");
var arr2= Array("linkNameA","linkNameB","linkNameC","linkNameD","linkNameE");
function writeLinks() {
for (i=0;ipeter,
>
>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 document.write ("href='"+arrLinx[a].url+"'>"+arrLinx[a].txt+"");
>
>}
>
>been a while since i programmed javascript in this manner so it may need
>some bashing around but the basic idea should work.
>
>a better way would be using a db and outputting server side of course.
>
>hth
>
>dave ecky
>
>David Eckersall
>Kinetic North Limited
>A member of the Wize Group of companies
>Reg Co No 4100142
>Reg Office and Business Address
>St James House, Wellington Road North
>Stockport SK4 2QN
>Office Tel - 00 44 161 975 5900
>Office Fax - 00 44 161 975 5924
>Web - http://www.kineticnorth.com
>
>This communication contains information which is confidential and may also
>be privileged. It is for the exclusive use of the intended recipient(s). If
>you are not the intended recipient(s) please note that any form of
>distribution, copying or use of this communication or the information in it
>is strictly prohibited and may be unlawful. If you have received this
>communication in error please return it to the sender. Internet e-mails are
>not necessarily secure. Kinetic North Limited does not accept responsibility
>for changes made to this message after it was sent. Our messages are checked
>for viruses but please note that we do not accept liability for any viruses
>which may be transmitted in or with this message.
>
>----- Original Message -----
>From: "Peter Small" [EMAIL REMOVED]
>To: [EMAIL REMOVED]
>Sent: Wednesday, April 18, 2001 7:34 AM
>Subject: FN-FORUM Dynamically creating links from arrays
>
>
>> 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
>
>
>
>============================================================
>
> * 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



Messages by Day
April 30th 2001
April 29th 2001
April 28th 2001
April 27th 2001
April 26th 2001
April 25th 2001
April 24th 2001
April 23rd 2001
April 22nd 2001
April 21st 2001
April 20th 2001
April 19th 2001
April 18th 2001
April 17th 2001
April 16th 2001
April 15th 2001
April 14th 2001
April 13th 2001
April 12th 2001
April 11th 2001
April 10th 2001
April 9th 2001
April 8th 2001
April 7th 2001
April 6th 2001
April 5th 2001
April 4th 2001
April 3rd 2001
April 2nd 2001
April 1st 2001


Messages by Month
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
January 2001


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000