Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Auto-create hyperlinks

    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).

    Code:
    <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.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Do you have an access to a server-side language? This is better done in server-side rather than in client-side.

  • #3
    New Coder
    Join Date
    Apr 2005
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •