URL autolink

Results 1 to 4 of 4

Thread: URL autolink

  1. #1
    Brandon Block Guest

    Default URL autolink

    Hi!<BR><BR>Is there a easy way to link any URL´s in a text string thats been fetched from a database?<BR><BR>

  2. #2
    BalletChick Guest

    Default RE: URL autolink

    If you mean to make the string into a &#039hot link&#039, you should simply surround it with the &#060;a href...&#062; tag. For example, if your URL is in strURL, use something like this:<BR><BR>response.write "&#060;a href=""" & strURL & """&#062;" & strURL & "&#060;/a&#062;"<BR><BR>

  3. #3
    Brandon Block Guest

    Default RE: URL autolink

    Thanx! but maybe i didnt explain the problem correct ;-) I would like to make a link of any occurance of http:// in the "text" string

  4. #4
    BalletChick Guest

    Default RE: URL autolink

    Yes, I was wondering...<BR><BR>Well, if you search (using INSTR) for all occurrences of &#039http:&#039, you should be able to do this. The problem will be correctly determining the &#039end&#039 of the URL. What is your &#039data&#039 like? For example, is this human-readable text (like magazine articles)? If so, you will have to do a fair amount of searching for the end of the URL, because it may be in the middle of a sentence and end with a space, or it may be delimited by a comma, or a period, or a question mark, etc.<BR>

Posting Permissions

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