E-Mail Problem. Must be basic I think...

  • Thread starter Thread starter DrugBust
  • Start date Start date
D

DrugBust

Guest
Hi all, I'm not much of an access user, in fact today is pretty much the first day I've used it. But I'm a web designer for a school district and we're having a problem with our district e-mail web page. We have a Access 2000 Database that stores Names, Extensions, and E-mail Addesses (stored in a field called USERID) of all employees of the district. We have a website that displays the e-mail addresses, and it is located here:

http://www.marshfield.k12.wi.us/email/all.asp

Our problem is that when a e-mail addess is clicked, a e-mail client opens, yet the address isn't carried over. In order to even get a e-mail client to open, I had to add a "mailto:" command in the web page, as I couldn't find such a function in Access. If I remove the Mailto: in the HTMl, the list just shows up as text. I suppose that it makes sense though, as the field "USERID" is a text field.

My question basically boils down to this, how can I take the text field USERID, and give it the mailto: ability so that it actually works?

I hope that this makes some semblance of sense.

Thanks much!!

Matt
 
Last edited:
The rpoblem isn't with access, it's witht he html.

If your view the source of your web page the links are setup like this

<a href="mailto:">adler@marshfield.k12.wi.us#http://adler@marshfield
</a>

they need to look like this for the address to be carried over

<a href="mailto:adler@marshfield.k12.wi.us">adler@marshfield.k12.wi.us#http://adler@marshfield
</a>

I think this is what you wanted to do..........?
 
You're right.

I can't believe I didn't think of this before. I'm still a problem though, but i think you have me on the right track. Here is code from from my HTML file.

<td>

<!--webbot bot="DatabaseResultColumn" startspan s-columnnames="BID,LastName,FirstName,Extension,BID2,BID3,BID4,ID-NEW,Forwarding Address,USERID,PASSWORD,FULLNAME,USERDIR,FLAGS,BLANK" s-column="USERID" b-tableformat="TRUE" b-hasHTML="FALSE" clientside local_preview="<font size="-1">&lt;&lt;</font>USERID<font size="-1">&gt;&gt;</font>" preview="<font size="-1">&lt;&lt;</font>USERID<font size="-1">&gt;&gt;</font>" -->

<%=FP_FieldVal(fp_rs,"USERID")%>

<!--webbot bot="DatabaseResultColumn" i-CheckSum="12434" endspan -->

</a>
</td>

My question has now become where to put the <href mailto:"">I've tried in a few plaes with bad results. Anyone have an idea?

Thanks!
 
Last edited:
Ok up front I have to say I would stay away from FP Database wizards at all costs. It is cleaner and better to use simple ASP.

Having said that I think this will work for you

<%=FP_FieldVal(fp_rs, ("<a href=mailto:") "USERID") & (">") & ("USERID") & ("</a>"%>

However I didn't have a Front Page web in working order to test it out on so I cant be 100% sure. Let me know if that does the trick or not. I have a FP web on a home computer where I can test it for real.
 
Last edited:
FP

Yea, I never would have used Front Page to make this. I'm basically just trying to clean up what was here before me.

I tried what you mentioned, but after I did so the browser couldn't display the page. Here again is the example of the ASP:

<%=FP_FieldVal(fp_rs,"USERID")%>

I replaced it with this:

<%=FP_FieldVal(fp_rs, ("<a href=mailto:") "USERID") & (">") & ("USERID") & ("</a>"%>

...which brought abut the "Cannot display page" or something to that effect. Any suggestions?

Thanks much.
 
DrugBust I put some ASP code up real quick that basicaly does the same thing that your page is doing here. Check it out I am actualy using your own data.

I added a few formatting tags to the table but you'll get the idea. Here is the asp code to do that. All you have to do is modify the database name, table name and possibly the path to match yours.

EDIT I added the code to another post because the code tags were screwing up the page margins in my Mozilla browser.
 
Last edited:
Code:
<%
	Const adOpenStatic = 3
	Const adUseClient = 3
	Const adLockReadOnly = 1
	Dim ConnStr
	connStr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" _
		& Server.MapPath("/fpdb/database.mdb")
	
	Dim Rs
	Set Rs=Server.CreateObject("ADODB.Recordset")
	Rs.CursorLocation=adUseClient
	Rs.Open "tblName", connStr, adOpenStatic, adLockReadOnly
	
	If Not Rs.EOF Then
	
%>
<html>

<head>
<title>New Page 1</title>
</head>

<body>
<%
	Dim X, iCount, bgColor

	
	Response.Write ("<Table border=1 cellpadding=2 cellspacing=0 Width=100% bordercolor=#008080>")
	Response.Write ("<tr>")
	Response.Write "<td bgcolor=><B>First Name</B></td>"
	Response.Write "<td><B>Last Name</B></td>"
	Response.Write "<td><B>Email</B></td>"
 	Response.Write "</tr>"
		While Not Rs.EOF
	
		if x = 1 then
        	Bgcolor="White"
        	x=2
        Else
            Bgcolor="#ECECEC"
            x=1
        End if 
		
		Response.Write ("<tr bgcolor="&Bgcolor&">")		
		Response.Write ("<td>")
		Response.Write Rs("FirstName")
		Response.Write "</td>"
		Response.Write ("<td>")
		Response.Write Rs("LastName")
		Response.Write "</td>"
		Response.Write ("<td>")
		Response.Write ("<a href=mailto:") & Rs("Email") & (">") & RS("Email") & ("</a>")
		Response.Write "</td>"
		Response.Write "</tr>" 
		iCount = iCount + 1
		Rs.MoveNext
	Wend
		Response.Write("")
		Rs.MoveFirst
	Else
		Response.Write "No records were found in the table"
	End If
	Rs.Close
	Set Rs = Nothing
%>

</body>
</html>
 
Last edited:
DrugBust did you get a chance to take a look at my demo and or use the code I posted?
 

Users who are viewing this thread

Back
Top Bottom