473,395 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

page owner information in footer of website

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
'C**********************@whatever.com
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")
%>
Jul 23 '05 #1
1 1368
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
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Niyazi | last post by:
Hi, I have an html page and I might be moving to asp.net page that contains a some kind of forum and string. It is kind of application form. User have to enter some (string) value into the...
0
by: Niyazi | last post by:
Hi all, This my aspx page first line of code. <%@ Page CodeBehind="index.aspx.vb" Language="vb" AutoEventWireup="false" Inherits="TB.index" %> Than inside head tag I have following script(s)...
2
by: Goober | last post by:
I have the following default.aspx page that works properly. However, what I want to do is to link the graphics within it (that are hard coded now in the default web page) to our corporate...
7
by: Alan Silver | last post by:
Hello, Sorry this is a bit wordy, but it's a pretty simple question... I have a web site, http://domain/ which is a public site, part of which (http://domain/a/) is protected by forms...
4
by: Garry Jones | last post by:
I have recently constructed a website using a lot of php script (self taught). I now wonder if I should have construted the site in a different way. The page contains a header (a.php) and left...
4
by: rsteph | last post by:
I've found a javascript menu download, I've been tweaking it within a testpage, and getting it to look just right. I finally got everything looking right, all I have to do is alter where the links...
13
by: Dan Aldean | last post by:
Hi, I use ASP.NET 2.0 and I created a stylesheet, but I don't know how to make it visible to a web form "MyWebPage.aspx" that uses the master page. I put a reference to the css in the .master...
3
by: Aaron | last post by:
I'm trying to parse a table on a webpage to pull down some data I need. The page is based off of information entered into a form. when you submit the data from the form it displays a...
6
mideastgirl
by: mideastgirl | last post by:
YIKES! I am having problems going from mideasthonors.org/addmember.php to either the error page because the form has not been filled out accurately, or to the thank you page!!!! Here is my script,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.