...

View Full Version : Auto-create hyperlinks



AlexRat
01-24-2006, 01:20 AM
I'm not sure Javascript is the way to do this, so bare with me.

I want to have specific words/phrases on a page automatically generated into links, perhaps with an XML document as shown below as the defining source (simply because I'm comfortable using them).


<links>
<entry>
<title>COLCHESTER ARTS CENTRE</title>
<url>http://www.colchesterartscentre.com</url>
</entry>
<entry>
<title>UPSTAIRS AT THE GARAGE</title>
<url>http://www.meanfiddler.com/displayPage_garage.asp?PageID=362</url>
</entry>
<entry>
<title>KUNK</title>
<url>http://www.kunk.co.uk</url>
</entry>
<entry>
<title>MASTERPLAN FOR FAILURE</title>
<url>http://www.myspace.com/masterplanforfailure</url>
</entry>
</links>
So whenever 'UPSTAIRS AT THE GARAGE' appears in a document, that text is automatically made as a link to 'http://www.meanfiddler.com/displayPage_garage.asp?PageID=362'. And the same with the other entries.

Feel free to slap me if this can't be done via javascript.

glenngv
01-24-2006, 03:35 AM
Do you have an access to a server-side language? This is better done in server-side rather than in client-side.

AlexRat
01-24-2006, 05:46 PM
Erm... PHP & CGI.

I'm not sure about anything else.

I've dabbled in some PHP before, but only entry level stuff I did via a tutorial and then modified the code slightly.

Any assistance would be greatly appreciated.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum