CreateAnchor

Creates an anchor by passing its arguments (used to be called URL2A), can create anchor to website, email, skype call or phone call with custom target.
Can also pass other Tags using OtherTags, that has anything need to add to the anchor, like "Class=""btn btn-light"""


Public

Tested

My Own Work
Function CreateAnchor(url, urlType, Target, OtherTags)
' Converts www.Blablawhatever.com to into < a href=http://www.Blablawhatever.com>www.Blablawhatever.com
' urlType can be "Web", "Phone" (and Tel), "Skype" or "email"
' OtherTags are anything need to add to the anchor, like "Class=""btn btn-light"""
Dim strBuf
strBuf  = url
If UCase(urlType) = "WEB" Then
If UCase(Left(url, 4)) = "WWW." Then
strBuf  = " Else
strBuf  = " End If
ElseIf UCase(urlType) = "SKYPE" Then
strBuf  = " ElseIf UCase(urlType) = "PHONE" Or UCase(urlType) = "TEL" Then
strBuf  = " ElseIf UCase(urlType) = "EMAIL" Then
strBuf  = " End If
If strBuf <> url Then strBuf = strBuf & ">" & url & ""
CreateAnchor = strBuf
End Function

url, urlType, Target, OtherTags

Views 5484 Downloads 1312

Classic ASP Layout+Design
ANmarAmdeen
747
Revisions

v1.0