<%@LANGUAGE="VBSCRIPT"%> <% Dim Recordset1 Dim Recordset1_numRows Set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_pelmley_STRING Recordset1.Source = "SELECT home_page_t, home_page FROM elmley" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 1 Recordset1.Open() Recordset1_numRows = 0 %> <% '---------------------------------------------- ' InsertHyperlinks(inText) ' Returns a inText with "URL" ' inserted where there is URL found. ' ' URL can start with "www" or "http" ' or ' URL can be a email address "*@*" '---------------------------------------------- Function InsertHyperlinks(inText) Dim objRegExp, strBuf Dim objMatches, objMatch Dim Value, ReplaceValue, iStart, iEnd strBuf = "" iStart = 1 iEnd = 1 Set objRegExp = New RegExp objRegExp.Pattern = "\b(wwwwww|\S+@)\S+\b" ' Match URLs and emails objRegExp.IgnoreCase = True ' Set case insensitivity. objRegExp.Global = True ' Set global applicability. Set objMatches = objRegExp.Execute(inText) For Each objMatch in objMatches iEnd = objMatch.FirstIndex strBuf = strBuf & Mid(inText, iStart, iEnd-iStart+1) If InStr(1, objMatch.Value, "@") Then strBuf = strBuf & GetHref(objMatch.Value, "EMAIL", "_BLANK") Else strBuf = strBuf & GetHref(objMatch.Value, "WEB", "") End If iStart = iEnd+objMatch.Length+1 Next strBuf = strBuf & Mid(inText, iStart) InsertHyperlinks = strBuf strBuf = Replace(strBuf,Chr(13),"
") End Function Function GetHref(url, urlType, Target) Dim strBuf strBuf = "" & url & "" Else strBuf = "" & url & "" End If ElseIf UCase(urlType) = "EMAIL" Then strBuf = "" & url & "" End If GetHref = strBuf strBuf = Replace(strBuf,Chr(13),"
") End Function %> Welcome to The Elmley Foundation

<%=(Recordset1.Fields.Item("home_page_t").Value)%>

<%=Replace(InsertHyperlinks((Recordset1.Fields.Item("home_page").Value)),Chr(13),"
")%>

<% Recordset1.Close() Set Recordset1 = Nothing %>