page owner information in footer of website

Discussion in 'Javascript' started by Whitney, Aug 2, 2004.

  1. Whitney

    Whitney Guest

    I would like all of our intranet pages to provide a link to the site
    owner... and when clicked the visitor should be able to send the owner
    an email.

    I was using ASP to do this (see below) but I would like to not have
    use the .asp extension on all 70,000 of our pages...

    Can i somehow get this (or similiar) functionality using javascript?
    You will notice that a _siteinfo.txt file has to be dropped into each
    directory for the code to work.

    This code also generates a page last modified date... but I did figure
    out how to get that info using javascript.

    <%
    Dim fso, fname, iname, imail, fpath
    Dim tsin, ln, contactline, fp, pagefile, pagedate

    ' Format of _siteinfo.txt data file...
    'CONTACT_NAME=Whitney Cali
    'CONTACT_EMAIL=


    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    fp = Request.ServerVariables("PATH_TRANSLATED")

    fpath = fso.GetParentFolderName(fp)

    fname = fpath + "\_siteinfo.txt"

    If fso.FileExists(fname) Then
    Set f = fso.GetFile(fname)
    Set tsin = f.OpenAsTextStream(1, -2)
    Do While Not tsin.AtEndOfStream
    ln = tsin.ReadLine()
    If Left(ln,12) = "CONTACT_NAME" Then
    iname = Mid(ln,14)
    End If
    If Left(ln,13) = "CONTACT_EMAIL" Then
    imail = Mid(ln,15)
    End If
    If Left(ln,13) = "CONTACT_PHONE" Then
    iphone = Mid(ln,15)
    End If
    Loop
    ' Close filestream
    tsin.Close
    If imail <> "" And iname <> "" Then
    contactline = "Site Owner: <a href='mailto:" & imail & "?subject=Web
    Site Feedback'>" & _
    iname & "</a> Phone: " & iphone
    Else
    contactline = ""
    End If
    Else
    contactline = ""
    End If
    Set tsin = Nothing

    Set pagefile = fso.GetFile(fp)
    pagedate = pagefile.DateLastModified

    Set pagefile = Nothing
    Set fso = Nothing

    pagename = Request.ServerVariables("PATH_INFO")
    %>
    Whitney, Aug 2, 2004
    #1
    1. Advertising

  2. Whitney wrote:
    > I would like all of our intranet pages to provide a link to the site
    > owner... and when clicked the visitor should be able to send the owner
    > an email.
    >
    > I was using ASP to do this (see below) but I would like to not have
    > use the .asp extension on all 70,000 of our pages...


    Don't do it then but let ASP parse *.html files, too.

    > Can i somehow get this (or similiar) functionality using javascript?


    Yes, but you will need a different server. ASP supports JScript, not
    JavaScript.

    > [...]
    > [VBScript code snipped]


    Wrong newsgroup.


    PointedEars
    Thomas 'PointedEars' Lahn, Aug 3, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dexter

    how to do postback in owner page?

    Dexter, Oct 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    364
    Karl Seguin
    Oct 4, 2004
  2. jojo
    Replies:
    20
    Views:
    1,077
  3. Replies:
    0
    Views:
    619
  4. Ingvar Nilsen

    How to access the owner Page from within a component

    Ingvar Nilsen, Dec 22, 2004, in forum: ASP .Net Building Controls
    Replies:
    8
    Views:
    128
    Ingvar Nilsen
    Dec 22, 2004
  5. Henrik
    Replies:
    1
    Views:
    408
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
Loading...

Share This Page