Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Rendere un URL clickabile con A HREF

    Salve.

    Ho un testo in un DB che stampo a video con un response.write. Quel che vorrei fare e' che se in questo testo c'e' un URL questo venga linktato con un normale A HREF. Esiste una qualche funzione gia' pronta per ottenere questo?

  2. #2
    codice:
    function urlMe(theText)
    if len(theText) > 0 then
      elText = split(theText," ")
        for i = 0 to uBound(elText)
          if left(elText(i),7) = "http://" then
            response.write "" & elText(i) & " "
          elseIf left(elText(i),4) = "www." then
            response.write "" & elText(i) & " "
          else
            response.write elText(i) & " "
          end if
        next
    end if
    end function
    
    testo = "ciao questo è il sito di www.htm.it e questo è il http://forum.html.it"
    call urlMe(testo)

  3. #3
    Funziona benissimo, grazie!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.